diff options
author | Bart Visscher <bartv@thisnet.nl> | 2012-08-07 20:33:25 +0200 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2012-08-07 20:43:00 +0200 |
commit | 7d20e98aec3cbea66134b40747881b0b7b51eb92 (patch) | |
tree | 4d9db7958c18d6d90e84ad6cd5a2d61378d86e17 /lib | |
parent | 95031cb139506e6f1426a78f6ac4dd764a2851a4 (diff) | |
download | nextcloud-server-7d20e98aec3cbea66134b40747881b0b7b51eb92.tar.gz nextcloud-server-7d20e98aec3cbea66134b40747881b0b7b51eb92.zip |
Move getting the path info to OC_Request
Diffstat (limited to 'lib')
-rw-r--r-- | lib/request.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/request.php b/lib/request.php index d013844f08d..9e38e6bbd13 100644 --- a/lib/request.php +++ b/lib/request.php @@ -53,6 +53,19 @@ class OC_Request { } /** + * @brief get Path info from request + * @returns string Path info or false when not found + */ + public static function getPathInfo() { + if (array_key_exists('PATH_INFO', $_SERVER)){ + $path_info = $_SERVER['PATH_INFO']; + }else{ + $path_info = substr($_SERVER['REQUEST_URI'], strlen($_SERVER['SCRIPT_NAME'])); + } + return $path_info; + } + + /** * @brief Check if this is a no-cache request * @returns true for no-cache */ |