New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes on must-have module upgrade #7697

Merged
merged 1 commit into from Apr 5, 2017

Conversation

Projects
None yet
2 participants
@Quetzacoalt91
Member

Quetzacoalt91 commented Mar 23, 2017

Questions Answers
Branch? 1.6.1.x
Description? On PrestaShop 1.6, the Addons team found out their modules coming from the must-have API cannot be updated. This PR is an equivalent of #7670 but for 1.6. It also fixes logical issues brought during the life-time of this major version.
Type? bug fix
Category? BO
BC breaks? Nope
Deprecations? Nope
Fixed ticket? /
How to test?
@@ -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) {

This comment has been minimized.

@Quetzacoalt91

Quetzacoalt91 Mar 23, 2017

Member

This foreach if part of another one, and its value used everywhere was erased by this one.
l.702, you can read foreach ($this->map as $key => $method) {.

@Quetzacoalt91

Quetzacoalt91 Mar 23, 2017

Member

This foreach if part of another one, and its value used everywhere was erased by this one.
l.702, you can read foreach ($this->map as $key => $method) {.

@@ -1026,7 +1027,7 @@ public function postProcessCallback()
$module_upgraded = implode('|', $module_upgraded);
if ($key == 'updateAll') {
if (Tools::getValue('updateAll')) {

This comment has been minimized.

@Quetzacoalt91

Quetzacoalt91 Mar 23, 2017

Member

We are not in the foreach anymore (foreach ($this->map as $key => $method) {).
In consequence, testing a value when not in the loop is useless, and brings bugs in some cases (in example, when we do not execute the action updateAll)

@Quetzacoalt91

Quetzacoalt91 Mar 23, 2017

Member

We are not in the foreach anymore (foreach ($this->map as $key => $method) {).
In consequence, testing a value when not in the loop is useless, and brings bugs in some cases (in example, when we do not execute the action updateAll)

@maximebiloe maximebiloe added this to the 1.6.1.13 milestone Mar 24, 2017

@maximebiloe

This comment has been minimized.

Show comment
Hide comment
@maximebiloe
Contributor

maximebiloe commented Apr 5, 2017

@maximebiloe maximebiloe merged commit 6f92f6b into PrestaShop:1.6.1.x Apr 5, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@maximebiloe maximebiloe deleted the Quetzacoalt91:module-page-logical-issues branch Apr 5, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment