Index: trunk/core/units/general/helpers/multilanguage.php =================================================================== diff -u -N -r7391 -r7635 --- trunk/core/units/general/helpers/multilanguage.php (.../multilanguage.php) (revision 7391) +++ trunk/core/units/general/helpers/multilanguage.php (.../multilanguage.php) (revision 7635) @@ -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; }