Skip to content

Commit

Permalink
Merge pull request #7697 from Quetzacoalt91/module-page-logical-issues
Browse files Browse the repository at this point in the history
Fixes on must-have module upgrade
  • Loading branch information
Maxime Biloé committed Apr 5, 2017
2 parents f668e1c + 043add9 commit 6f92f6b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions controllers/admin/AdminModulesController.php
Expand Up @@ -769,6 +769,7 @@ public function postProcessCallback()
$files_list = array(
array('type' => 'addonsNative', 'file' => Module::CACHE_FILE_DEFAULT_COUNTRY_MODULES_LIST, 'loggedOnAddons' => 0),
array('type' => 'addonsBought', 'file' => Module::CACHE_FILE_CUSTOMER_MODULES_LIST, 'loggedOnAddons' => 1),
array('type' => 'addonsMustHave', 'file' => Module::CACHE_FILE_MUST_HAVE_MODULES_LIST, 'loggedOnAddons' => 1),
);

foreach ($files_list as $f) {
Expand Down Expand Up @@ -950,7 +951,7 @@ public function postProcessCallback()
if (isset($this->_modules_ad[$module->name])) {
$ad_modules = $this->getModulesByInstallation($this->_modules_ad[$module->name]);

foreach ($ad_modules['not_installed'] as $key => &$module) {
foreach ($ad_modules['not_installed'] as &$module) {
if (isset($module->addons_buy_url)) {
$module->addons_buy_url = str_replace('utm_source=v1trunk_api', 'utm_source=back-office', $module->addons_buy_url)
.'&utm_medium=related-modules&utm_campaign=back-office-'.strtoupper($this->context->language->iso_code)
Expand Down Expand Up @@ -1026,7 +1027,7 @@ public function postProcessCallback()

$module_upgraded = implode('|', $module_upgraded);

if ($key == 'updateAll') {
if (Tools::getValue('updateAll')) {
Tools::redirectAdmin(self::$currentIndex.'&token='.$this->token.'&allUpdated=1');
} elseif (isset($module_upgraded) && $module_upgraded != '') {
Tools::redirectAdmin(self::$currentIndex.'&token='.$this->token.'&updated=1&module_name='.$module_upgraded);
Expand Down

0 comments on commit 6f92f6b

Please sign in to comment.