Changeset View
Changeset View
Standalone View
Standalone View
branches/5.2.x/core/units/helpers/language_import_helper.php
Show First 20 Lines • Show All 718 Lines • ▼ Show 20 Line(s) | |||||
} | } | ||||
/** | /** | ||||
* Prepares mapping between event name+type and their ids in database | * Prepares mapping between event name+type and their ids in database | ||||
* | * | ||||
*/ | */ | ||||
function _updateEventsCache() | function _updateEventsCache() | ||||
{ | { | ||||
$table_name = $this->Application->getUnitOption('email-template', 'TableName'); | |||||
// During upgrade from 5.1.x to 5.2.x without this there will be tons of notices. | |||||
if ( defined('IS_INSTALL') && IS_INSTALL && !$this->Conn->TableFound($table_name, true) ) { | |||||
$this->events_hash = array(); | |||||
return; | |||||
} | |||||
$sql = 'SELECT TemplateId, CONCAT(TemplateName,"_",Type) AS EventMix | $sql = 'SELECT TemplateId, CONCAT(TemplateName,"_",Type) AS EventMix | ||||
FROM ' . $this->Application->getUnitOption('email-template', 'TableName'); | FROM ' . $table_name; | ||||
$this->events_hash = $this->Conn->GetCol($sql, 'EventMix'); | $this->events_hash = $this->Conn->GetCol($sql, 'EventMix'); | ||||
} | } | ||||
/** | /** | ||||
* Returns language fields to be exported | * Returns language fields to be exported | ||||
* | * | ||||
* @return Array | * @return Array | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 512 Lines • ▼ Show 20 Line(s) | |||||
$ids .= ',' . $row[$list->IDField]; | $ids .= ',' . $row[$list->IDField]; | ||||
} | } | ||||
$ids = substr($ids, 1); | $ids = substr($ids, 1); | ||||
} | } | ||||
return $ids; | return $ids; | ||||
} | } | ||||
} | } | ||||
No newline at end of file |