On rajoute les derniers modules et on modifie les CSS
This commit is contained in:
31
modules/ets_advancedcaptcha/upgrade/index.php
Normal file
31
modules/ets_advancedcaptcha/upgrade/index.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2020 ETS-Soft
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This file is not open source! Each license that you purchased is only available for 1 wesite only.
|
||||
* If you want to use this file on more websites (or projects), you need to purchase additional licenses.
|
||||
* You are not allowed to redistribute, resell, lease, license, sub-license or offer our resources to any third party.
|
||||
*
|
||||
* 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 contact us for extra customization service at an affordable price
|
||||
*
|
||||
* @author ETS-Soft <etssoft.jsc@gmail.com>
|
||||
* @copyright 2007-2020 ETS-Soft
|
||||
* @license Valid for 1 website (or project) for each purchase of license
|
||||
* International Registered Trademark & Property of ETS-Soft
|
||||
*/
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
?>
|
||||
54
modules/ets_advancedcaptcha/upgrade/install-1.0.9.php
Normal file
54
modules/ets_advancedcaptcha/upgrade/install-1.0.9.php
Normal file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2020 ETS-Soft
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This file is not open source! Each license that you purchased is only available for 1 wesite only.
|
||||
* If you want to use this file on more websites (or projects), you need to purchase additional licenses.
|
||||
* You are not allowed to redistribute, resell, lease, license, sub-license or offer our resources to any third party.
|
||||
*
|
||||
* 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 contact us for extra customization service at an affordable price
|
||||
*
|
||||
* @author ETS-Soft <etssoft.jsc@gmail.com>
|
||||
* @copyright 2007-2020 ETS-Soft
|
||||
* @license Valid for 1 website (or project) for each purchase of license
|
||||
* International Registered Trademark & Property of ETS-Soft
|
||||
*/
|
||||
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
function upgrade_module_1_0_9($object)
|
||||
{
|
||||
$res = $object->registerHooks() && $object->installConfig(true);
|
||||
|
||||
/*updateValue position*/
|
||||
$positions = array();
|
||||
if (Configuration::get('PA_CAPTCHA_CONTACT'))
|
||||
$positions[] = 'contact';
|
||||
if (Configuration::get('PA_CAPTCHA_REGISTRATION'))
|
||||
$positions[] = 'register';
|
||||
$res &= Configuration::updateValue('PA_CAPTCHA_POSITION', ($positions? implode(',', $positions) : 'register,contact'), true);
|
||||
|
||||
/*updateValue override template contact form*/
|
||||
if (($contact = Configuration::get('PA_CAPTCHA_OVERRIDES')))
|
||||
Configuration::updateValue('PA_CAPTCHA_TMP_CONTACT', $contact);
|
||||
|
||||
/*update Override*/
|
||||
if ($object->getOverrides() != null)
|
||||
{
|
||||
$object->uninstallOverrides();
|
||||
try {
|
||||
$object->installOverrides();
|
||||
} catch (Exception $e) {
|
||||
$object->_errors[] = $e->getMessage();
|
||||
}
|
||||
if (!$object->_errors)
|
||||
$res &= true;
|
||||
}
|
||||
return $res;
|
||||
}
|
||||
37
modules/ets_advancedcaptcha/upgrade/install-1.1.5.php
Normal file
37
modules/ets_advancedcaptcha/upgrade/install-1.1.5.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2020 ETS-Soft
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This file is not open source! Each license that you purchased is only available for 1 wesite only.
|
||||
* If you want to use this file on more websites (or projects), you need to purchase additional licenses.
|
||||
* You are not allowed to redistribute, resell, lease, license, sub-license or offer our resources to any third party.
|
||||
*
|
||||
* 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 contact us for extra customization service at an affordable price
|
||||
*
|
||||
* @author ETS-Soft <etssoft.jsc@gmail.com>
|
||||
* @copyright 2007-2020 ETS-Soft
|
||||
* @license Valid for 1 website (or project) for each purchase of license
|
||||
* International Registered Trademark & Property of ETS-Soft
|
||||
*/
|
||||
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
function upgrade_module_1_1_5($object)
|
||||
{
|
||||
if (!Module::isInstalled('psgdpr')){
|
||||
$object->registerHook('registerGDPRConsent');
|
||||
}else{
|
||||
$idModuleConsen = Db::getInstance()->getValue('SELECT id_module FROM `' . _DB_PREFIX_ . 'psgdpr_consent` psgdpr WHERE id_module = ' . (int)$object->id);
|
||||
if (!$idModuleConsen){
|
||||
$object->addMesGdpr();
|
||||
}
|
||||
}
|
||||
$object->registerHook('actionOutputHTMLBefore');
|
||||
return true;
|
||||
}
|
||||
91
modules/ets_advancedcaptcha/upgrade/install-1.1.6.php
Normal file
91
modules/ets_advancedcaptcha/upgrade/install-1.1.6.php
Normal file
@@ -0,0 +1,91 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2020 ETS-Soft
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This file is not open source! Each license that you purchased is only available for 1 wesite only.
|
||||
* If you want to use this file on more websites (or projects), you need to purchase additional licenses.
|
||||
* You are not allowed to redistribute, resell, lease, license, sub-license or offer our resources to any third party.
|
||||
*
|
||||
* 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 contact us for extra customization service at an affordable price
|
||||
*
|
||||
* @author ETS-Soft <etssoft.jsc@gmail.com>
|
||||
* @copyright 2007-2020 ETS-Soft
|
||||
* @license Valid for 1 website (or project) for each purchase of license
|
||||
* International Registered Trademark & Property of ETS-Soft
|
||||
*/
|
||||
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
function upgrade_module_1_1_6($object)
|
||||
{
|
||||
$object->regexTemplates();
|
||||
|
||||
Configuration::deleteByName('PA_CAPTCHA_TMP_CONTACT');
|
||||
Configuration::deleteByName('PA_CAPTCHA_TMP_LOGIN');
|
||||
Configuration::deleteByName('PA_CAPTCHA_TMP_RE_PASSWORD');
|
||||
|
||||
uninstallModuleInGDPR($object);
|
||||
|
||||
if ($object->getOverrides() != null) {
|
||||
$dir = realpath(dirname(__FILE__) . '/../') . '/override/controllers/front/';
|
||||
$classes = array(
|
||||
'Auth',
|
||||
'Contact',
|
||||
'Password'
|
||||
);
|
||||
foreach ($classes as $class){
|
||||
beforeUninstallOverride($dir, $class);
|
||||
}
|
||||
$object->uninstallOverrides();
|
||||
try {
|
||||
foreach ($classes as $class) {
|
||||
beforeInstallOverride($dir, $class);
|
||||
}
|
||||
$object->installOverrides();
|
||||
} catch (Exception $e) {
|
||||
$object->_errors[] = $e->getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
return count($object->_errors) > 0 ? false : true;
|
||||
}
|
||||
|
||||
function uninstallModuleInGDPR($object)
|
||||
{
|
||||
if (Module::isInstalled('psgdpr') && $object->id) {
|
||||
if ($gdpr = Db::getInstance()->getRow('
|
||||
SELECT id_module, id_gdpr_consent
|
||||
FROM `' . _DB_PREFIX_ . 'psgdpr_consent`
|
||||
WHERE id_module = ' . (int)$object->id
|
||||
)) {
|
||||
Db::getInstance()->execute("DELETE FROM `" . _DB_PREFIX_ . "psgdpr_consent` WHERE id_module = " . (int)$gdpr['id_module']);
|
||||
Db::getInstance()->execute("DELETE FROM `" . _DB_PREFIX_ . "psgdpr_consent_lang` WHERE id_gdpr_consent = " . (int)$gdpr['id_gdpr_consent']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function beforeUninstallOverride($dir, $class)
|
||||
{
|
||||
$rebuild_class_content = preg_replace(
|
||||
'#(class\s+' . $class . 'Controller\s+extends\s+' . $class . 'ControllerCore\s+\{)#ms'
|
||||
, '$1/*-----start-----*/public function initContent(){parent::initContent();}/*-----end-----*/'
|
||||
, Tools::file_get_contents($dir . $class . 'Controller.php')
|
||||
);
|
||||
@file_put_contents($dir . $class . 'Controller.php', $rebuild_class_content);
|
||||
}
|
||||
|
||||
function beforeInstallOverride($dir, $class)
|
||||
{
|
||||
$rebuild_class_content = preg_replace(
|
||||
'#\/\*[-]{5}start[-]{5}\*\/(.*?)\/*[-]{5}end[-]{5}\*\/#ms'
|
||||
, ''
|
||||
, Tools::file_get_contents($dir . $class . 'Controller.php')
|
||||
);
|
||||
@file_put_contents($dir . $class . 'Controller.php', $rebuild_class_content);
|
||||
}
|
||||
Reference in New Issue
Block a user