64 lines
1.8 KiB
PHP
64 lines
1.8 KiB
PHP
|
<?php
|
||
|
|
||
|
/**
|
||
|
* 2007-2016 PrestaShop
|
||
|
*
|
||
|
* DISCLAIMER
|
||
|
*
|
||
|
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||
|
* versions in the future. If you wish to customize PrestaShop for your
|
||
|
* needs please refer to http://www.prestashop.com for more information.
|
||
|
*
|
||
|
* @category Atos
|
||
|
* @package Atos
|
||
|
* @author PrestaShop SA <contact@prestashop.com>
|
||
|
* @copyright 2007-2014 PrestaShop SA
|
||
|
* @license http://addons.prestashop.com/en/content/12-terms-and-conditions-of-use
|
||
|
* @link http://addons.prestashop.com/2376-coupons-discount-vouchers.html
|
||
|
* International Registered Trademark & Property of PrestaShop SA
|
||
|
*/
|
||
|
|
||
|
if (!defined('_PS_VERSION_')) {
|
||
|
exit;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Upgrade method from 3.x.x
|
||
|
*
|
||
|
* @param Object $object Module instance
|
||
|
*
|
||
|
* @return bool
|
||
|
**/
|
||
|
function upgrade_module_3_1_1($module)
|
||
|
{
|
||
|
$currentController = Context::getContext()->controller;
|
||
|
$errorMessage = 'Failed to update atos configuration during 3.1.1 upgrade:';
|
||
|
|
||
|
try {
|
||
|
return Configuration::updateValue('ATOS_TEMPLATE_NAME', 'mytemplate');
|
||
|
} catch (PrestaShopDatabaseException $e) {
|
||
|
$currentController->_errors[] = $module->l('Failed to update module. Please see the logs for more details.');
|
||
|
if (version_compare(_PS_VERSION_, '1.6.0.3', '>=')) {
|
||
|
PrestaShopLogger::addLog(
|
||
|
$errorMessage.$e->getMessage(),
|
||
|
4,
|
||
|
null,
|
||
|
'Atos',
|
||
|
isset($module->id) ? $module->id : null,
|
||
|
true
|
||
|
);
|
||
|
} else {
|
||
|
Logger::addLog(
|
||
|
$errorMessage.$e->getMessage(),
|
||
|
4,
|
||
|
null,
|
||
|
'Atos',
|
||
|
isset($module->id) ? $module->id : null,
|
||
|
true
|
||
|
);
|
||
|
}
|
||
|
|
||
|
return false;
|
||
|
}
|
||
|
}
|