]> source.dussan.org Git - nextcloud-server.git/commitdiff
more improved error reporting
authorFrank Karlitschek <karlitschek@kde.org>
Sat, 6 Aug 2011 21:31:38 +0000 (23:31 +0200)
committerFrank Karlitschek <karlitschek@kde.org>
Sat, 6 Aug 2011 21:31:38 +0000 (23:31 +0200)
core/templates/layout.guest.php
lib/base.php
lib/helper.php

index 5655a64d8da3f6b3f9c5a1d39afbcf4c1e605575..0b6189ef1c902cfa5056833a13462ea82299e99f 100644 (file)
@@ -4,13 +4,13 @@
                <title>ownCloud</title>
                <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
                <link rel="shortcut icon" href="<?php echo image_path('', 'favicon.png'); ?>" /><link rel="apple-touch-icon-precomposed" href="<?php echo image_path('', 'favicon-touch.png'); ?>" />
-               <?php foreach($_['cssfiles'] as $cssfile): ?>
+               <?php if(isset($_['cssfiles'])) foreach($_['cssfiles'] as $cssfile): ?>
                        <link rel="stylesheet" href="<?php echo $cssfile; ?>" type="text/css" media="screen" />
                <?php endforeach; ?>
                <script type="text/javascript">
                        var oc_webroot = '<?php global $WEBROOT; echo $WEBROOT; ?>';
                // </script>
-               <?php foreach($_['jsfiles'] as $jsfile): ?>
+               <?php if(isset($_['jsfiles'])) foreach($_['jsfiles'] as $jsfile): ?>
                        <script type="text/javascript" src="<?php echo $jsfile; ?>"></script>
                <?php endforeach; ?>
        
index d02f63a2766f8a6cd1963746aaf15e238c465486..270e8c20c7596938417c0220f787136bcce803e7 100644 (file)
@@ -128,14 +128,6 @@ if( OC_Config::getValue( "forcessl", false )){
 $errors=OC_Util::checkServer();
 $error=(count($errors)>0);
 
-if($error) {
-       $tmpl = new OC_Template( '', 'error', 'guest' );
-       $tmpl->assign('errors',$errors);
-       $tmpl->printPage();
-       exit;
-}
-
-
 
 // User and Groups
 if( !OC_Config::getValue( "installed", false )){
@@ -173,6 +165,17 @@ OC_HOOK::connect('OC_User', 'post_createUser', 'OC_Connector_Sabre_Principal', '
 OC_HOOK::connect('OC_User', 'post_deleteUser', 'OC_Connector_Sabre_Principal', 'deletePrincipal');
 
 
+
+if($error) {
+       $tmpl = new OC_Template( '', 'error', 'guest' );
+       $tmpl->assign('errors',$errors);
+       $tmpl->printPage();
+       exit;
+}
+
+
+
+
 // FROM Connect.php
 function OC_CONNECT_TEST($path,$user,$password){
        echo 'connecting...';
index 5dc3dd44a15d7e7b874ede948a539b1ac75c4e67..fa5163ac26621e86c5a856f974d9259f3bf79abd 100755 (executable)
@@ -204,7 +204,7 @@ class OC_Helper {
                        }
                }
                closedir($dh);
-               if(chmod($path, $filemode))
+               if(@chmod($path, $filemode))
                        return TRUE;
                else
                        return FALSE;