Changeset View
Changeset View
Standalone View
Standalone View
branches/5.2.x/core/units/helpers/deployment_helper.php
Show First 20 Lines • Show All 273 Lines • ▼ Show 20 Line(s) | |||||
/** | /** | ||||
* Import latest languagepack (without overwrite) | * Import latest languagepack (without overwrite) | ||||
* | * | ||||
* @return void | * @return void | ||||
* @access private | * @access private | ||||
*/ | */ | ||||
private function importLanguagePack() | private function importLanguagePack() | ||||
{ | { | ||||
/** @var LanguageImportHelper $language_import_helper */ | |||||
$language_import_helper = $this->Application->recallObject('LanguageImportHelper'); | $language_import_helper = $this->Application->recallObject('LanguageImportHelper'); | ||||
/* @var $language_import_helper LanguageImportHelper */ | |||||
$this->out('Importing LanguagePack ... '); | $this->out('Importing LanguagePack ... '); | ||||
$filename = $this->getModuleFile('english.lang'); | $filename = $this->getModuleFile('english.lang'); | ||||
$language_import_helper->performImport($filename, '|0|1|2|', $this->moduleName, LANG_SKIP_EXISTING); | $language_import_helper->performImport($filename, '|0|1|2|', $this->moduleName, LANG_SKIP_EXISTING); | ||||
$this->displayStatus('OK'); | $this->displayStatus('OK'); | ||||
} | } | ||||
/** | /** | ||||
* Exports latest language pack | * Exports latest language pack | ||||
* | * | ||||
* @return void | * @return void | ||||
* @access private | * @access private | ||||
*/ | */ | ||||
private function exportLanguagePack() | private function exportLanguagePack() | ||||
{ | { | ||||
static $languages = null; | static $languages = null; | ||||
if ( !isset($languages) ) { | if ( !isset($languages) ) { | ||||
$sql = 'SELECT LanguageId | $sql = 'SELECT LanguageId | ||||
FROM ' . $this->Application->getUnitOption('lang', 'TableName') . ' | FROM ' . $this->Application->getUnitOption('lang', 'TableName') . ' | ||||
WHERE Enabled = 1'; | WHERE Enabled = 1'; | ||||
$languages = $this->Conn->GetCol($sql); | $languages = $this->Conn->GetCol($sql); | ||||
} | } | ||||
/** @var LanguageImportHelper $language_import_helper */ | |||||
$language_import_helper = $this->Application->recallObject('LanguageImportHelper'); | $language_import_helper = $this->Application->recallObject('LanguageImportHelper'); | ||||
/* @var $language_import_helper LanguageImportHelper */ | |||||
$language_import_helper->performExport(EXPORT_PATH . '/' . $this->moduleName . '.lang', '|0|1|2|', $languages, '|' . $this->moduleName . '|'); | $language_import_helper->performExport(EXPORT_PATH . '/' . $this->moduleName . '.lang', '|0|1|2|', $languages, '|' . $this->moduleName . '|'); | ||||
} | } | ||||
/** | /** | ||||
* Resets unit and section cache | * Resets unit and section cache | ||||
* | * | ||||
* @return void | * @return void | ||||
▲ Show 20 Lines • Show All 375 Lines • Show Last 20 Lines |