40 lines
1.3 KiB
PHP
40 lines
1.3 KiB
PHP
<?php
|
|
/**
|
|
* Copyright ETS Software Technology Co., Ltd
|
|
*
|
|
* NOTICE OF LICENSE
|
|
*
|
|
* This file is not open source! Each license that you purchased is only available for 1 website 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.
|
|
*
|
|
* @author ETS Software Technology Co., Ltd
|
|
* @copyright ETS Software Technology Co., Ltd
|
|
* @license Valid for 1 website (or project) for each purchase of license
|
|
*/
|
|
|
|
if (!defined('_PS_VERSION_'))
|
|
exit;
|
|
|
|
/**
|
|
* @param $object Ets_reviews
|
|
*/
|
|
function upgrade_module_1_1_0($object)
|
|
{
|
|
// Configuration:
|
|
$execCmd = Configuration::updateValue('ETS_RV_FREE_DOWNLOADS_ENABLED', Module::isEnabled('ets_free_downloads') ? 1 : 0);
|
|
$execCmd &= $object->registerHook('displayVerifyPurchase');
|
|
$execCmd &= Db::getInstance()->execute('
|
|
UPDATE `' . _DB_PREFIX_ . 'ets_rv_product_comment` SET `verified_purchase`=\'auto\'
|
|
WHERE `question`=0
|
|
AND `verified_purchase`!=\'no\'
|
|
AND `verified_purchase`!=\'yes\'
|
|
');
|
|
|
|
return $execCmd;
|
|
} |