Code

Updated deamon handle
[gosa.git] / gosa-core / html / main.php
index be0b728693130d99698fe63fee2c33830f241c3f..2b7f3a4a777c4599d13de67f70856572a9c77eaa 100644 (file)
@@ -30,7 +30,7 @@ header("Content-type: text/html; charset=UTF-8");
 
 /* Set the text domain as 'messages' */
 $domain = 'messages';
-bindtextdomain($domain, "$BASE_DIR/locale");
+bindtextdomain($domain, LOCALE_DIR);
 textdomain($domain);
 
 /* Remember everything we did after the last click */
@@ -132,7 +132,7 @@ $GLOBALS['t_gettext_message_dir'] = $BASE_DIR.'/locale/';
 
 /* Set the text domain as 'messages' */
 $domain = 'messages';
-bindtextdomain($domain, "$BASE_DIR/locale");
+bindtextdomain($domain, LOCALE_DIR);
 textdomain($domain);
 @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, $lang, "Setting language to");
 
@@ -142,7 +142,12 @@ if (!session::is_set('plist')){
   $class_list= get_declared_classes();
   foreach ($class_mapping as $class => $path){
     if (!in_array($class, $class_list)){
-        require_once("$BASE_DIR/$path");
+       if (is_readable("$BASE_DIR/$path")){
+               require_once("$BASE_DIR/$path");
+       } else {
+               echo sprintf(_("Fatal error: cannot locate file '%s' - please run '%s' to fix this"), "$BASE_DIR/$path", "<b>update-gosa</b>");
+               exit;
+       }
     }
   }