summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/request.php13
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
*/