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

"/>
+ +
+

+
+ +
+ "/> +
@@ -307,4 +315,4 @@ - \ No newline at end of file + Index: core/install/english.lang =================================================================== --- core/install/english.lang +++ core/install/english.lang @@ -34,6 +34,7 @@ RGVwbG95 RGVzaWduIE1vZGU= RG93bg== + RHVtcA== RWRpdA== RWRpdCBCbG9jaw== RWRpdCBDb250ZW50 @@ -1542,7 +1543,8 @@ U3lzdGVtIFRvb2xz Q2xlYXIgVGVtcGxhdGVzIENhY2hl Q29tbW9ubHkgVXNlZCBLZXlz - RGVwbG95IENoYW5nZXM= + RGVwbG95IENoYW5nZXM= + RHVtcCBBc3NldHM= S2V5IE5hbWU= S2V5IFZhbHVl TG9jYXRlIFVuaXQgQ29uZmlnIEZpbGU= Index: core/install/upgrades.sql =================================================================== --- core/install/upgrades.sql +++ core/install/upgrades.sql @@ -2940,3 +2940,7 @@ UPDATE Modules SET ClassNamespace = 'InPortal\\Core' WHERE `Name` IN ('Core', 'In-Portal'); + +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: core/units/admin/admin_events_handler.php =================================================================== --- core/units/admin/admin_events_handler.php +++ 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: core/units/helpers/deployment_helper.php =================================================================== --- core/units/helpers/deployment_helper.php +++ core/units/helpers/deployment_helper.php @@ -203,6 +203,7 @@ if ( $ret && !$this->dryRun ) { $this->resetCaches(); $this->refreshThemes(); + $this->dumpAssets(); } if ( !$this->isCommandLine ) { @@ -349,6 +350,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: core/units/helpers/minifiers/minify_helper.php =================================================================== --- core/units/helpers/minifiers/minify_helper.php +++ 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: core/units/helpers/themes_helper.php =================================================================== --- core/units/helpers/themes_helper.php +++ 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(); } /**