Index: branches/unlabeled/unlabeled-1.28.2/core/units/languages/languages_event_handler.php =================================================================== diff -u -r7456 -r7467 --- branches/unlabeled/unlabeled-1.28.2/core/units/languages/languages_event_handler.php (.../languages_event_handler.php) (revision 7456) +++ branches/unlabeled/unlabeled-1.28.2/core/units/languages/languages_event_handler.php (.../languages_event_handler.php) (revision 7467) @@ -31,6 +31,7 @@ $ml_helper =& $this->Application->recallObject('kMultiLanguageHelper'); $this->Application->UnitConfigReader->includeConfigFiles(MODULES_PATH); //make sure to re-read all configs + $this->Application->UnitConfigReader->AfterConfigRead(); foreach ($this->Application->UnitConfigReader->configData as $prefix => $config_data) { $ml_helper->createFields($prefix); } Index: branches/unlabeled/unlabeled-1.8.2/core/units/general/helpers/multilanguage.php =================================================================== diff -u -r7010 -r7467 --- branches/unlabeled/unlabeled-1.8.2/core/units/general/helpers/multilanguage.php (.../multilanguage.php) (revision 7010) +++ branches/unlabeled/unlabeled-1.8.2/core/units/general/helpers/multilanguage.php (.../multilanguage.php) (revision 7467) @@ -79,6 +79,18 @@ $this->curIndexCount = count($this->Conn->Query('SHOW INDEXES FROM '.$table_name)); // } } + + /** + * Checks if table exists in database + * + * @param string $table_name + * @return bool + */ + function tableExists($table_name) + { + $sql = 'SHOW TABLES LIKE "'.$table_name.'"'; + return $this->Conn->Query($sql) ? true : false; + } /** * Creates missing multilanguage fields in table by specified prefix @@ -95,7 +107,7 @@ $table_name = $this->Application->getUnitOption($prefix, 'TableName'); $this->curFields = $this->Application->getUnitOption($prefix, 'Fields'); - if (!($table_name && $this->curFields) ) { + if (!($table_name && $this->curFields) || ($table_name && !$this->tableExists($table_name))) { // invalid config found or prefix not found return true; }