includes/paths.php
changeset 982 bd349add2697
parent 979 aafb9f6806c9
child 1053 bdbb49cf6f1b
--- a/includes/paths.php	Fri May 15 14:16:22 2009 -0400
+++ b/includes/paths.php	Fri May 15 14:27:35 2009 -0400
@@ -210,8 +210,7 @@
       {
         $title = basename($_SERVER['SCRIPT_NAME']);
       }
-      if ( scriptPath != '' )
-        $base_uri = str_replace( scriptPath . '/', '', $_SERVER['SCRIPT_NAME'] );
+      $base_uri = scriptPath == '' ? ltrim($_SERVER['SCRIPT_NAME'], '/') : str_replace( scriptPath . '/', '', $_SERVER['SCRIPT_NAME'] );
       
       $this->page = $this->nslist['API'] . sanitize_page_id($base_uri);
       $this->fullpage = $this->nslist['API'] . sanitize_page_id($base_uri);