Skip to content

Commit

Permalink
Merge pull request #343 from PrestaShop/dev
Browse files Browse the repository at this point in the history
Bump version 4.10.0
  • Loading branch information
jolelievre authored Nov 22, 2019
2 parents 973fa1a + b201b1a commit 1302047
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion autoupgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function __construct()
$this->name = 'autoupgrade';
$this->tab = 'administration';
$this->author = 'PrestaShop';
$this->version = '4.9.0';
$this->version = '4.10.0';
$this->need_instance = 1;

$this->bootstrap = true;
Expand Down
14 changes: 9 additions & 5 deletions classes/UpgradeTools/CoreUpgrader/CoreUpgrader.php
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,8 @@ protected function getUpgradeSqlFilesListToApply($upgrade_dir_sql, $oldversion)
*/
protected function applySqlParams(array $sqlFiles)
{
$search = array('PREFIX_', 'ENGINE_TYPE');
$replace = array(_DB_PREFIX_, (defined('_MYSQL_ENGINE_') ? _MYSQL_ENGINE_ : 'MyISAM'));
$search = array('PREFIX_', 'ENGINE_TYPE', 'DB_NAME');
$replace = array(_DB_PREFIX_, (defined('_MYSQL_ENGINE_') ? _MYSQL_ENGINE_ : 'MyISAM'), _DB_NAME_);

$sqlRequests = array();

Expand Down Expand Up @@ -387,16 +387,20 @@ protected function runPhpQuery($upgrade_file, $query)
if (!file_exists($this->pathToPhpUpgradeScripts . strtolower($func_name) . '.php')) {
$this->logger->error('[ERROR] ' . $upgrade_file . ' PHP - missing file ' . $query);
$this->container->getState()->setWarningExists(true);
} else {
require_once $this->pathToPhpUpgradeScripts . strtolower($func_name) . '.php';
$phpRes = call_user_func_array($func_name, $parameters);

return;
}

require_once $this->pathToPhpUpgradeScripts . strtolower($func_name) . '.php';
$phpRes = call_user_func_array($func_name, $parameters);
}
// Or an object method
else {
$func_name = array($php[0], str_replace($pattern[0], '', $php[1]));
$this->logger->error('[ERROR] ' . $upgrade_file . ' PHP - Object Method call is forbidden (' . $php[0] . '::' . str_replace($pattern[0], '', $php[1]) . ')');
$this->container->getState()->setWarningExists(true);

return;
}

if (isset($phpRes) && (is_array($phpRes) && !empty($phpRes['error'])) || $phpRes === false) {
Expand Down
2 changes: 1 addition & 1 deletion config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<module>
<name>autoupgrade</name>
<displayName><![CDATA[1-Click Upgrade]]></displayName>
<version><![CDATA[4.9.0]]></version>
<version><![CDATA[4.10.0]]></version>
<description><![CDATA[Provides an automated method to upgrade your shop to the latest version of PrestaShop.]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[administration]]></tab>
Expand Down

0 comments on commit 1302047

Please sign in to comment.