mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 01:30:50 -04:00
Merge branch 'stable4' of git://gitorious.org/owncloud/owncloud into stable4
This commit is contained in:
commit
83caaa6d3f
1 changed files with 2 additions and 2 deletions
|
|
@ -128,7 +128,7 @@ class OC{
|
|||
// calculate the documentroot
|
||||
OC::$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';
|
||||
|
|
@ -438,7 +438,7 @@ class OC{
|
|||
register_shutdown_function(array('OC_Helper','cleanTmp'));
|
||||
|
||||
//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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue