includes/paths.php
changeset 979 aafb9f6806c9
parent 974 6bfe9eb428e9
child 982 bd349add2697
--- a/includes/paths.php	Thu May 14 11:34:24 2009 -0400
+++ b/includes/paths.php	Fri May 15 13:31:12 2009 -0400
@@ -210,7 +210,9 @@
       {
         $title = basename($_SERVER['SCRIPT_NAME']);
       }
-      $base_uri = str_replace( scriptPath . '/', '', $_SERVER['SCRIPT_NAME'] );
+      if ( scriptPath != '' )
+        $base_uri = 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);
       $this->namespace = 'API';