Index: branches/RC/core/units/languages/import_xml.php =================================================================== diff -u -r10832 -r11188 --- branches/RC/core/units/languages/import_xml.php (.../import_xml.php) (revision 10832) +++ branches/RC/core/units/languages/import_xml.php (.../import_xml.php) (revision 11188) @@ -91,11 +91,16 @@ $this->lang_object =& $this->Application->recallObject('lang.import', null, Array ('skip_autoload' => true)); + $this->_updateEventsCache(); + + $this->ip_address = getenv('HTTP_X_FORWARDED_FOR') ? getenv('HTTP_X_FORWARDED_FOR') : getenv('REMOTE_ADDR'); + } + + function _updateEventsCache() + { $sql = 'SELECT EventId, CONCAT(Event,"_",Type) AS EventMix FROM ' . TABLE_PREFIX . 'Events'; $this->events_hash = $this->Conn->GetCol($sql, 'EventMix'); - - $this->ip_address = getenv('HTTP_X_FORWARDED_FOR') ? getenv('HTTP_X_FORWARDED_FOR') : getenv('REMOTE_ADDR'); } function SetEncoding($enc) @@ -139,6 +144,11 @@ // define the XML parsing routines/functions to call based on the handler path if( !file_exists($filename) || !$phrase_types /*|| !$module_ids*/ ) return false; + if (defined('IS_INSTALL') && IS_INSTALL) { + // new events could be added during module upgrade + $this->_updateEventsCache(); + } + $this->_initImportTables(); $phrase_types = explode('|', substr($phrase_types, 1, -1) );