diff options
author | Georg Ehrke <dev@georgswebsite.de> | 2012-04-20 22:33:30 +0200 |
---|---|---|
committer | Georg Ehrke <dev@georgswebsite.de> | 2012-04-20 22:33:30 +0200 |
commit | 99a473bd628c08dc2f232c98b9220a029ad5ab99 (patch) | |
tree | 322b20c5f2f798ae2933fdcfb4fb33b51ec87a7e | |
parent | 2e8531370102b33a072c6b981d2b1e6a1c9cf40e (diff) | |
download | nextcloud-server-99a473bd628c08dc2f232c98b9220a029ad5ab99.tar.gz nextcloud-server-99a473bd628c08dc2f232c98b9220a029ad5ab99.zip |
support file calls with parameter
-rw-r--r-- | lib/base.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/base.php b/lib/base.php index fa5287631d8..df240dca6df 100644 --- a/lib/base.php +++ b/lib/base.php @@ -401,8 +401,12 @@ class OC{ self::$REQUESTEDAPP = (isset($_GET['app'])?strip_tags($_GET['app']):'files'); self::$REQUESTEDFILE = $_GET['file']; if(substr_count(self::$REQUESTEDFILE, '?') != 0){ - $pos = strpos(self::$REQUESTEDFILE, '?'); - self::$REQUESTEDFILE = substr(self::$REQUESTEDFILE, 0, $pos); + $pos_questionmark = strpos(self::$REQUESTEDFILE, '?'); + $pos_equal = strpos(self::$REQUESTEDFILE, '='); + $pos_and = strpos(self::$REQUESTEDFILE, '?'); + $_GET[substr(self::$REQUESTEDFILE, $pos_questionmark + 1, $pos_equal - $pos_questionmark - 1)] = substr(self::$REQUESTEDFILE, $pos_equal + 1, $pos_and); + self::$REQUESTEDFILE = substr(self::$REQUESTEDFILE, 0, $pos_questionmark); + $_GET['file'] = OC::$REQUESTEDFILE; } self::$REQUESTEDFILE = (isset($_GET['file'])?(OC_Helper::issubdirectory(OC::$APPSROOT . '/' . self::$REQUESTEDAPP . '/' . self::$REQUESTEDFILE, OC::$APPSROOT . '/' . self::$REQUESTEDAPP)?self::$REQUESTEDFILE:null):null); } |