diff options
author | Brice Maron <brice@bmaron.net> | 2012-06-14 21:16:59 +0000 |
---|---|---|
committer | Brice Maron <brice@bmaron.net> | 2012-06-14 21:16:59 +0000 |
commit | 4753cc3ebde9867ab4deb1979fb4231b0c847426 (patch) | |
tree | c6944e947bc84c8716b57b7e2b06ef51efccb3db /lib/base.php | |
parent | 6da5a2fdd4e8a19ab993b4a1f7de7e45b8922a16 (diff) | |
parent | f3b30e4658c4dde82b56b458c672fa5edcba5d6b (diff) | |
download | nextcloud-server-4753cc3ebde9867ab4deb1979fb4231b0c847426.tar.gz nextcloud-server-4753cc3ebde9867ab4deb1979fb4231b0c847426.zip |
Merge branch 'master' into multi_app_dir
Conflicts:
apps/bookmarks/ajax/addBookmark.php
config/config.sample.php
lib/app.php
remote.php
Diffstat (limited to 'lib/base.php')
-rw-r--r-- | lib/base.php | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/lib/base.php b/lib/base.php index ca4052e5a18..a0f5e83dd47 100644 --- a/lib/base.php +++ b/lib/base.php @@ -120,7 +120,7 @@ class OC{ // calculate the documentroot $DOCUMENTROOT=realpath($_SERVER['DOCUMENT_ROOT']); OC::$SERVERROOT=str_replace("\\",'/',substr(__FILE__,0,-13)); - OC::$SUBURI=substr(realpath($_SERVER["SCRIPT_FILENAME"]),strlen(OC::$SERVERROOT)); + OC::$SUBURI= str_replace("\\","/",substr(realpath($_SERVER["SCRIPT_FILENAME"]),strlen(OC::$SERVERROOT))); $scriptName=$_SERVER["SCRIPT_NAME"]; if(substr($scriptName,-1)=='/'){ $scriptName.='index.php'; @@ -428,15 +428,8 @@ class OC{ //make sure temporary files are cleaned up register_shutdown_function(array('OC_Helper','cleanTmp')); - if (OC_Config::getValue('installed', false)) { - if (!OC_AppConfig::getValue('core', 'remote_core.css', false)) { - OC_AppConfig::setValue('core', 'remote_core.css', '/core/minimizer.php'); - OC_AppConfig::setValue('core', 'remote_core.js', '/core/minimizer.php'); - } - } - //parse the given parameters - self::$REQUESTEDAPP = (isset($_GET['app'])?str_replace(array('\0', '/', '\\', '..'), '', strip_tags($_GET['app'])):OC_Config::getValue('defaultapp', 'files')); + self::$REQUESTEDAPP = (isset($_GET['app']) && trim($_GET['app']) != '' && !is_null($_GET['app'])?str_replace(array('\0', '/', '\\', '..'), '', strip_tags($_GET['app'])):OC_Config::getValue('defaultapp', 'files')); if(substr_count(self::$REQUESTEDAPP, '?') != 0){ $app = substr(self::$REQUESTEDAPP, 0, strpos(self::$REQUESTEDAPP, '?')); $param = substr(self::$REQUESTEDAPP, strpos(self::$REQUESTEDAPP, '?') + 1); |