Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Redirect to the user default page
- */
- public static function redirectToDefaultPage(){
- 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 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();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement