diff options
author | Bart Visscher <bartv@thisnet.nl> | 2012-06-20 17:10:17 +0200 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2012-06-20 17:10:49 +0200 |
commit | 7a3d606cacb68c23d7972d078370c58d4a8f8a2c (patch) | |
tree | a4c63bb70f845a54d1f8f73877743ee5e7258e68 /lib/util.php | |
parent | 6404476bec76a5c4bc2c6d3bb1508bb1c6c025f2 (diff) | |
download | nextcloud-server-7a3d606cacb68c23d7972d078370c58d4a8f8a2c.tar.gz nextcloud-server-7a3d606cacb68c23d7972d078370c58d4a8f8a2c.zip |
Prefer requested app before redirecting to default page
Diffstat (limited to 'lib/util.php')
-rwxr-xr-x | lib/util.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/util.php b/lib/util.php index 46c9e0ef927..7792f96d445 100755 --- a/lib/util.php +++ b/lib/util.php @@ -324,7 +324,11 @@ class OC_Util { OC_Log::write('core','redirectToDefaultPage',OC_Log::DEBUG); if(isset($_REQUEST['redirect_url']) && (substr($_REQUEST['redirect_url'], 0, strlen(OC::$WEBROOT)) == OC::$WEBROOT || $_REQUEST['redirect_url'][0] == '/')) { header( 'Location: '.$_REQUEST['redirect_url']); - } else { + } + else if (isset(OC::$REQUESTEDAPP) && !empty(OC::$REQUESTEDAPP)) { + header( 'Location: '.OC::$WEBROOT.'/?app='.OC::$REQUESTEDAPP ); + } + else { header( 'Location: '.OC::$WEBROOT.'/'.OC_Appconfig::getValue('core', 'defaultpage', '?app=files')); } exit(); |