Skip to content
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

Allow users to ignore the PrestaShop requirements which can be incomplete #167

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions AdminSelfUpgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,10 @@ public function postProcess()
Configuration::updateGlobalValue('PS_SHOP_ENABLE', 0);
}

if (Tools14::isSubmit('ignorePsRequirements')) {
Configuration::updateValue('PS_AUTOUP_IGNORE_REQS', 1);
}

if (Tools14::isSubmit('customSubmitAutoUpgrade')) {
$config_keys = array_keys(array_merge($this->_fieldsUpgradeOptions, $this->_fieldsBackupOptions));
$config = array();
Expand Down
5 changes: 5 additions & 0 deletions classes/TaskRunner/Upgrade/UpgradeComplete.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
use PrestaShop\Module\AutoUpgrade\UpgradeTools\FilesystemAdapter;
use PrestaShop\Module\AutoUpgrade\UpgradeContainer;

use Configuration;

/**
* Ends the upgrade process and displays the success message.
*/
Expand Down Expand Up @@ -58,5 +60,8 @@ public function run()
}

$this->container->getSymfonyAdapter()->clearMigrationCache();

// Reinit config
Configuration::deleteByName('PS_AUTOUP_IGNORE_REQS');
}
}
2 changes: 1 addition & 1 deletion classes/UpgradeSelfCheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ public function getMaxExecutionTime()

public function isPrestaShopReady()
{
return $this->prestashopReady;
return $this->prestashopReady || 1 === Configuration::get('PS_AUTOUP_IGNORE_REQS');
}

/**
Expand Down
7 changes: 6 additions & 1 deletion views/templates/block/checklist.twig
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,12 @@
{% if isPrestaShopReady %}
{{ 'PrestaShop requirements are satisfied. '|trans }}
{% else %}
{{ 'PrestaShop requirements are not satisfied. '|trans }} <a href="{{ informationsLink }}">{{ 'See details.'|trans }}</a>
{{ 'PrestaShop requirements are not satisfied. [1]See details[/1] or [2]ignore[/2].'|trans({
'[1]': '<a href="' ~ informationsLink ~'">',
'[/1]': '</a>',
'[2]': '<a href="' ~ currentIndex ~ '&token=' ~ token ~ '&ignorePsRequirements=1">',
'[/2]': '</a>',
})|raw }}
{% endif %}
</td>
<td>
Expand Down