# HG changeset patch # User Dan # Date 1242412055 14400 # Node ID bd349add2697b2c7cd6a185cfd7508f5d95e6ca3 # Parent 888502d761b45cb5b95bcaead5cc5b2430e16bbf Fixed some PHP warnings with API pages diff -r 888502d761b4 -r bd349add2697 includes/paths.php --- 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);