@@ -12,44 +12,44 @@ public ValueCollectionLock()
1212
1313 public ValueCollectionLock ( string AspxPagePath , string RequestPath , bool RewriteAspxFileToDirectory , bool IgnoreDefaultAfterRewrite )
1414 {
15- string Sections = RequestPath ;
15+ string Segments = RequestPath ;
1616
17- Sections = Sections . GetTextBeforeValue ( "?" ) ;
17+ Segments = Segments . GetTextBeforeValue ( "?" ) ;
1818
19- if ( StaticObject . PreventAccessDefaultAspx && Sections . EndsWith ( "/Default.aspx" ) )
20- Sections = Sections . GetTextBeforeLastValue ( "/Default.aspx" ) ;
19+ if ( StaticObject . PreventAccessDefaultAspx && Segments . EndsWith ( "/Default.aspx" ) )
20+ Segments = Segments . GetTextBeforeLastValue ( "/Default.aspx" ) ;
2121
22- if ( string . IsNullOrEmpty ( Sections ) )
22+ if ( string . IsNullOrEmpty ( Segments ) )
2323 return ;
2424
25- if ( Sections . StartsWith ( AspxPagePath ) )
26- Sections = Sections . Remove ( 0 , AspxPagePath . Length ) ;
27- else if ( Sections . StartsWith ( AspxPagePath . GetTextBeforeValue ( ".aspx" ) + "/" ) && RewriteAspxFileToDirectory && ! IgnoreDefaultAfterRewrite )
28- Sections = Sections . Remove ( 0 , AspxPagePath . GetTextBeforeValue ( ".aspx" ) . Length ) ;
29- else if ( Sections . StartsWith ( AspxPagePath . GetTextBeforeValue ( "/Default.aspx" ) ) )
30- Sections = Sections . Remove ( 0 , AspxPagePath . GetTextBeforeValue ( "/Default.aspx" ) . Length ) ;
31- else if ( Sections . StartsWith ( AspxPagePath . GetTextBeforeValue ( ".aspx" ) ) )
25+ if ( Segments . StartsWith ( AspxPagePath ) )
26+ Segments = Segments . Remove ( 0 , AspxPagePath . Length ) ;
27+ else if ( Segments . StartsWith ( AspxPagePath . GetTextBeforeValue ( ".aspx" ) + "/" ) && RewriteAspxFileToDirectory && ! IgnoreDefaultAfterRewrite )
28+ Segments = Segments . Remove ( 0 , AspxPagePath . GetTextBeforeValue ( ".aspx" ) . Length ) ;
29+ else if ( Segments . StartsWith ( AspxPagePath . GetTextBeforeValue ( "/Default.aspx" ) ) )
30+ Segments = Segments . Remove ( 0 , AspxPagePath . GetTextBeforeValue ( "/Default.aspx" ) . Length ) ;
31+ else if ( Segments . StartsWith ( AspxPagePath . GetTextBeforeValue ( ".aspx" ) ) )
3232 {
3333 if ( RewriteAspxFileToDirectory )
3434 if ( ! ( IgnoreDefaultAfterRewrite && AspxPagePath . EndsWith ( "/Default.aspx" ) ) )
35- Sections = Sections . Remove ( 0 , AspxPagePath . GetTextBeforeValue ( ".aspx" ) . Length ) ;
35+ Segments = Segments . Remove ( 0 , AspxPagePath . GetTextBeforeValue ( ".aspx" ) . Length ) ;
3636 }
3737 else
3838 return ;
3939
4040
41- if ( Sections . Length == 0 )
41+ if ( Segments . Length == 0 )
4242 return ;
4343
44- if ( Sections [ 0 ] != '/' )
44+ if ( Segments [ 0 ] != '/' )
4545 return ;
4646
47- if ( Sections == "/Default" && RewriteAspxFileToDirectory && ! IgnoreDefaultAfterRewrite )
47+ if ( Segments == "/Default" && RewriteAspxFileToDirectory && ! IgnoreDefaultAfterRewrite )
4848 return ;
4949
50- Sections = Sections . Remove ( 0 , 1 ) ;
50+ Segments = Segments . Remove ( 0 , 1 ) ;
5151
52- ValueList = Sections . Split ( "/" ) ;
52+ ValueList = Segments . Split ( "/" ) ;
5353
5454 Lock = true ;
5555 }
0 commit comments