Skip to content
Snippets Groups Projects
Commit bae592d6 authored by Bart Visscher's avatar Bart Visscher
Browse files

Prefer requested app before redirecting to default page

parent a7e427a3
No related branches found
No related tags found
No related merge requests found
......@@ -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();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment