瀏覽代碼

Add check of configuration file.

philippe_mingo 23 年之前
父節點
當前提交
9e83bf8de7
共有 1 個文件被更改,包括 16 次插入0 次删除
  1. 16 0
      src/login.php

+ 16 - 0
src/login.php

@@ -53,6 +53,22 @@
         $rcptaddress = urlencode($rcptaddress);
         $rcptaddress = urlencode($rcptaddress);
     }
     }
 
 
+    /* Check if system has been configured */
+    if ( !file_exists( '../config/config.php' ) ) {
+        echo "<html>\n".
+             "<head>\n".
+             '<title>' . _("Configuration Error") . "</title>\n".
+             "</head>\n".
+             "<body>\n" .
+             '<center><h1>' . 
+             _("This system has not been configured yet.") .
+             '<br>' .
+             _("Please contact system administrator.") .
+             '</h1></center>'.
+             "</body></html>\n";
+        exit;
+    }
+
     require_once('../functions/strings.php');
     require_once('../functions/strings.php');
     require_once('../config/config.php');
     require_once('../config/config.php');
     require_once('../functions/i18n.php');
     require_once('../functions/i18n.php');