diff options
author | Brion Vibber <brion@pobox.com> | 2009-10-12 21:01:34 +0000 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2009-10-12 21:01:34 +0000 |
commit | 18df82ba2302d5b72bc42f4d3296d6fff7d16341 (patch) | |
tree | ce2f955ff860b8d7355d64391d68a0f955067ec9 /index.php | |
parent | 131292472c4bca7e99ee821ae62853f36f4c7bef (diff) | |
parent | 2b6dfbdf2b9df0992018f8df1f54b4cf16185599 (diff) |
Merge branch '0.8.x' of git://gitorious.org/~brion/statusnet/brion-fixes into 0.8.x
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -32,7 +32,13 @@ function getPath($req) && array_key_exists('p', $req)) { return $req['p']; } else if (array_key_exists('PATH_INFO', $_SERVER)) { - return $_SERVER['PATH_INFO']; + $path = $_SERVER['PATH_INFO']; + $script = $_SERVER['SCRIPT_NAME']; + if (substr($path, 0, mb_strlen($script)) == $script) { + return substr($path, mb_strlen($script)); + } else { + return $path; + } } else { return null; } |