Changeset View
Changeset View
Standalone View
Standalone View
branches/5.2.x/core/units/helpers/deployment_helper.php
Show First 20 Lines • Show All 302 Lines • ▼ Show 20 Line(s) | |||||
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 */ | /** @var LanguageImportHelper $language_import_helper */ | ||||
$language_import_helper = $this->Application->recallObject('LanguageImportHelper'); | $language_import_helper = $this->Application->recallObject('LanguageImportHelper'); | ||||
$language_import_helper->performExport(EXPORT_PATH . '/' . $this->moduleName . '.lang', '|0|1|2|', $languages, '|' . $this->moduleName . '|'); | $this->out('Exporting LanguagePack ... '); | ||||
$language_import_helper->performExport( | |||||
EXPORT_PATH . '/' . $this->moduleName . '.lang', | |||||
'|0|1|2|', | |||||
$languages, | |||||
'|' . $this->moduleName . '|' | |||||
); | |||||
$this->displayStatus('OK'); | |||||
} | } | ||||
/** | /** | ||||
* Resets unit and section cache | * Resets unit and section cache | ||||
* | * | ||||
* @return void | * @return void | ||||
* @access private | * @access private | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 159 Lines • ▼ Show 20 Line(s) | |||||
*/ | */ | ||||
private function applyRevisions() | private function applyRevisions() | ||||
{ | { | ||||
if ( !$this->revisionSqls ) { | if ( !$this->revisionSqls ) { | ||||
return true; | return true; | ||||
} | } | ||||
if ( $this->dryRun ) { | if ( $this->dryRun ) { | ||||
$this->out('Simulating Database Upgrade ... ', true); | |||||
foreach ( $this->revisionSqls as $revision => $sqls ) { | |||||
echo PHP_EOL . $this->colorText($this->revisionTitles[$revision], 'gray', true) . PHP_EOL; | |||||
echo '...' . PHP_EOL; | |||||
} | |||||
echo PHP_EOL; | |||||
$this->appliedRevisions = array_merge($this->appliedRevisions, array_keys($this->revisionSqls)); | $this->appliedRevisions = array_merge($this->appliedRevisions, array_keys($this->revisionSqls)); | ||||
return true; | return true; | ||||
} | } | ||||
$this->out('Upgrading Database ... ', true); | $this->out('Upgrading Database ... ', true); | ||||
foreach ($this->revisionSqls as $revision => $sqls) { | foreach ($this->revisionSqls as $revision => $sqls) { | ||||
▲ Show 20 Lines • Show All 198 Lines • Show Last 20 Lines |