mirror of
https://github.com/nextcloud/server.git
synced 2026-06-12 02:00:51 -04:00
Prefer requested app before redirecting to default page
This commit is contained in:
parent
a7e427a3cc
commit
bae592d69b
1 changed files with 5 additions and 1 deletions
|
|
@ -326,7 +326,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();
|
||||
|
|
|
|||
Loading…
Reference in a new issue