Files
2019-11-17 19:14:07 +01:00

48 lines
1.1 KiB
PHP

<?php
/**
* 2008-today Mediacom87
*
* NOTICE OF LICENSE
*
* Read in the module
*
* @author Mediacom87 <support@mediacom87.net>
* @copyright 2008-today Mediacom87
* @license define in the module
*/
if (!defined('_TB_VERSION_')
&& !defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_1_2_0()
{
if ($conf = unserialize(Configuration::get('medtnttrackingparcel'))) {
$default = array(
'SECURITY' => Tools::encrypt(Tools::getShopDomainSsl().time()),
'DELIVERY_BEFORE' => 4,
'DELIVERY_STATE' => 5,
'DELIVERY_RELAY' => 5,
'DELIVERY_RELAY_FLAG' => true,
'DELIVERY_ABS' => 5,
'DELIVERY_INFO' => false,
'DELIVERY_PROOF' => false,
'NB_ORDERS' => 20
);
foreach ($default as $k => $v) {
if (!isset($conf[$k])) {
$conf[$k] = $v;
}
}
if (!Configuration::updateValue('medtnttrackingparcel', serialize($conf))) {
return false;
} else {
return true;
}
}
return false;
}