]> source.dussan.org Git - nextcloud-server.git/commitdiff
More helpfull debug msg for redirectToDefaultPage
authorBart Visscher <bartv@thisnet.nl>
Tue, 3 Jul 2012 15:54:12 +0000 (17:54 +0200)
committerBart Visscher <bartv@thisnet.nl>
Wed, 4 Jul 2012 15:51:07 +0000 (17:51 +0200)
lib/util.php

index 0d9f4129442f445236eb79dba1f8209d826a8aa4..2a7b8a922f9dad7a23ade46c4e2e97b4bcd6fdd8 100755 (executable)
@@ -324,16 +324,17 @@ class OC_Util {
        * 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']);
+                       $location = $_REQUEST['redirect_url'];
                }
                else if (isset(OC::$REQUESTEDAPP) && !empty(OC::$REQUESTEDAPP)) {
-                       header( 'Location: '.OC::$WEBROOT.'/?app='.OC::$REQUESTEDAPP );
+                       $location = OC::$WEBROOT.'/?app='.OC::$REQUESTEDAPP;
                }
                else {
-                       header( 'Location: '.OC::$WEBROOT.'/'.OC_Appconfig::getValue('core', 'defaultpage', '?app=files'));
+                       $location = OC::$WEBROOT.'/'.OC_Appconfig::getValue('core', 'defaultpage', '?app=files');
                }
+               OC_Log::write('core', 'redirectToDefaultPage: '.$location, OC_Log::DEBUG);
+               header( 'Location: '.$location );
                exit();
        }