fix #8131 - chinese translations
[Pman.Core] / Config.php
index f5144bc..d6dc5e6 100644 (file)
@@ -21,18 +21,30 @@ class Pman_Core_Config {
     
     function init($ff, $cfg)
     {
-      
+        
+        
+        
         $cfg = $this->overlayDefaults($cfg);
         
         if (!empty($this->memory_limit)) {
             $mem = ini_get('memory_limit');
             if (php_sapi_name() != 'cli' && $this->to_bytes($mem) < $this->to_bytes($this->memory_limit)) {
-                die("increase the memory limit settings to 2048M or more");
+                trigger_error("increase the memory limit settings to 2048M or more", E_USER_ERROR);
             }
         
         }
+        
         $this->verifyExtensions();
         
+        
+        if (!isset($cfg['Pman']['timezone'])) {
+            trigger_error("timezone needs setting in Pman[timezone]", E_USER_ERROR);
+        }
+        if ($cfg['Pman']['timezone'] != ini_get('date.timezone')) {
+            trigger_error("timezone needs setting in php.ini date.timezone = " . $cfg['Pman']['timezone'], E_USER_ERROR);
+        }
+        
+        
         return $cfg;
     }
     
@@ -99,7 +111,7 @@ class Pman_Core_Config {
         if(empty($error)){
            return true; 
         }
-        die(implode('\n', $error));
+        trigger_error("Missing Extensions: \n" . implode('\n', $error), E_USER_ERROR);
     }
 
 }