Index: branches/5.2.x/core/admin_templates/tools/system_tools.tpl =================================================================== --- branches/5.2.x/core/admin_templates/tools/system_tools.tpl +++ branches/5.2.x/core/admin_templates/tools/system_tools.tpl @@ -133,13 +133,21 @@ "/> -
+

"/>
+ +
+

+
+ +
+ "/> +
@@ -307,4 +315,4 @@ - \ No newline at end of file + Index: branches/5.2.x/core/install/english.lang =================================================================== --- branches/5.2.x/core/install/english.lang +++ branches/5.2.x/core/install/english.lang @@ -34,6 +34,7 @@ RGVwbG95 RGVzaWduIE1vZGU= RG93bg== + RHVtcA== RWRpdA== RWRpdCBCbG9jaw== RWRpdCBDb250ZW50 @@ -1543,7 +1544,8 @@ U3lzdGVtIFRvb2xz Q2xlYXIgVGVtcGxhdGVzIENhY2hl Q29tbW9ubHkgVXNlZCBLZXlz - RGVwbG95IENoYW5nZXM= + RGVwbG95IENoYW5nZXM= + RHVtcCBBc3NldHM= S2V5IE5hbWU= S2V5IFZhbHVl TG9jYXRlIFVuaXQgQ29uZmlnIEZpbGU= Index: branches/5.2.x/core/install/upgrades.sql =================================================================== --- branches/5.2.x/core/install/upgrades.sql +++ branches/5.2.x/core/install/upgrades.sql @@ -2946,3 +2946,7 @@ UPDATE LanguageLabels SET l1_Translation = 'Incorrect date format, please use ({format}) ex. ({sample})' WHERE PhraseKey = 'LA_ERR_BAD_DATE_FORMAT'; + +UPDATE LanguageLabels +SET l1_HintTranslation = REPLACE(l1_HintTranslation, '
  • This deploy script will reset all caches at once
  • ', '
  • This deploy script will reset all caches at once.
  • \r\n
  • This deploy script will dump production assets.
  • \r\n') +WHERE PhraseKey = 'LA_TITLE_SYSTEMTOOLSDEPLOY'; Index: branches/5.2.x/core/units/admin/admin_events_handler.php =================================================================== --- branches/5.2.x/core/units/admin/admin_events_handler.php +++ branches/5.2.x/core/units/admin/admin_events_handler.php @@ -50,10 +50,11 @@ { $perm_value = null; - $system_events = Array ( + $system_events = array( 'OnResetModRwCache', 'OnResetSections', 'OnResetConfigsCache', 'OnResetParsedData', 'OnResetMemcache', 'OnDeleteCompiledTemplates', 'OnCompileTemplates', 'OnGenerateTableStructure', 'OnSynchronizeDBRevisions', - 'OnDeploy', 'OnRebuildThemes', 'OnCheckPrefixConfig', 'OnMemoryCacheGet', 'OnMemoryCacheSet' + 'OnDeploy', 'OnRebuildThemes', 'OnDumpAssets', 'OnCheckPrefixConfig', 'OnMemoryCacheGet', + 'OnMemoryCacheSet', ); if ( in_array($event->Name, $system_events) ) { @@ -499,6 +500,28 @@ } /** + * Dumps assets + * + * @param kEvent $event Event. + * + * @return void + */ + protected function OnDumpAssets(kEvent $event) + { + if ( $this->Application->GetVar('ajax') == 'yes' ) { + $event->status = kEvent::erSTOP; + } + + /** @var MinifyHelper $minify_helper */ + $minify_helper = $this->Application->recallObject('MinifyHelper'); + + $minify_helper->delete(); + $minify_helper->dump(); + + $event->SetRedirectParam('action_completed', 1); + } + + /** * Saves grid column widths after their resize by user * * @param kEvent $event Index: branches/5.2.x/core/units/helpers/deployment_helper.php =================================================================== --- branches/5.2.x/core/units/helpers/deployment_helper.php +++ branches/5.2.x/core/units/helpers/deployment_helper.php @@ -203,6 +203,7 @@ if ( $ret && !$this->dryRun ) { $this->resetCaches(); $this->refreshThemes(); + $this->dumpAssets(); } if ( !$this->isCommandLine ) { @@ -356,6 +357,18 @@ } /** + * Dumps assets + * + * @return void + */ + private function dumpAssets() + { + $this->out('Dumping Assets ... '); + $this->_event->CallSubEvent('OnDumpAssets'); + $this->displayStatus('OK'); + } + + /** * Runs database upgrade script * * @return bool Index: branches/5.2.x/core/units/helpers/minifiers/minify_helper.php =================================================================== --- branches/5.2.x/core/units/helpers/minifiers/minify_helper.php +++ branches/5.2.x/core/units/helpers/minifiers/minify_helper.php @@ -191,6 +191,21 @@ } /** + * Dumps the assets. + * + * @return void + */ + public function dump() + { + /** @var kCurlHelper $curl_helper */ + $curl_helper = $this->Application->recallObject('CurlHelper'); + $curl_helper->setOptions(array( + CURLOPT_COOKIE => 'debug_off=1', + )); + $curl_helper->Send($this->Application->BaseURL()); + } + + /** * Compress $string based on $extension * * @param string $string Index: branches/5.2.x/core/units/helpers/themes_helper.php =================================================================== --- branches/5.2.x/core/units/helpers/themes_helper.php +++ branches/5.2.x/core/units/helpers/themes_helper.php @@ -552,11 +552,6 @@ $this->Application->incrementCacheSerial('theme'); $this->Application->incrementCacheSerial('theme-file'); - - /** @var MinifyHelper $minify_helper */ - $minify_helper = $this->Application->recallObject('MinifyHelper'); - - $minify_helper->delete(); } /**