Changeset 269 for trunk/trax/vendor/trax/action_controller.php
- Timestamp:
- 10/31/06 18:44:25 (6 years ago)
- Files:
-
- 1 modified
-
trunk/trax/vendor/trax/action_controller.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/trax/vendor/trax/action_controller.php
r229 r269 415 415 416 416 # current url 417 if(isset($_SERVER['REDIRECT_URL']) ) {417 if(isset($_SERVER['REDIRECT_URL']) && !stristr($_SERVER['REDIRECT_URL'], 'dispatch.php')) { 418 418 $browser_url = $_SERVER['REDIRECT_URL']; 419 } else { 420 $browser_url = $_SERVER['REQUEST_URI']; 421 } 422 #if(strstr($_SERVER['REQUEST_URI'], "?")) 423 # $browser_url = substr($_SERVER['REQUEST_URI'], 0, strpos($_SERVER['REQUEST_URI'], "?")); 424 #else 425 # $browser_url = $_SERVER['REQUEST_URI']; 426 419 } elseif(isset($_SERVER['REQUEST_URI'])) { 420 $browser_url = strstr($_SERVER['REQUEST_URI'], "?") ? 421 substr($_SERVER['REQUEST_URI'], 0, strpos($_SERVER['REQUEST_URI'], "?")) : 422 $_SERVER['REQUEST_URI']; 423 } 424 427 425 //error_log('browser url='.$browser_url); 428 426 # strip off url prefix, if any … … 431 429 } 432 430 433 # strip leading slash 434 // FIXME: Do we know for sure that the435 // initial '/' will be there?436 $browser_url = substr($browser_url,1);431 # strip leading slash (if any) 432 if(substr($browser_url, 0, 1) == "/") { 433 $browser_url = substr($browser_url, 1); 434 } 437 435 438 436 # strip trailing slash (if any)
