✏️ 正在编辑: install-1.0.14.php
路径:
/home/bpioifn/www/pigmentse/modules/axepta/upgrade/install-1.0.14.php
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<?php /** * 1961-2020 BNP Paribas * * NOTICE OF LICENSE * * This source file is subject to the Open Software License (OSL 3.0) that is available * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0 * If you are unable to obtain it through the world-wide-web, please send an email * to modules@quadra-informatique.fr so we can send you a copy immediately. * * @author Quadra Informatique <modules@quadra-informatique.fr> * @copyright 1961-2020 BNP Paribas * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ if (!defined('_PS_VERSION_')) { exit; } require_once _PS_MODULE_DIR_ . 'axepta/classes/AxeptaLogger.php'; function upgrade_module_1_0_14($module) { AxeptaLogger::log('Start', AxeptaLogger::LOG_DEBUG , AxeptaLogger::FILE_DEBUG); $module->registerOrderStatus(); $sql = array(); $query = ' SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE COLUMN_NAME= "id_order_slip" AND TABLE_NAME= "' . _DB_PREFIX_ . 'axepta_transaction" AND TABLE_SCHEMA = "'._DB_NAME_.'" '; $result = Db::getInstance()->ExecuteS($query); if (!$result) { $sql[] = 'ALTER TABLE `'._DB_PREFIX_.'axepta_transaction` ADD `id_order_slip` int(11) DEFAULT NULL AFTER `id_order`'; } if (AxeptaXml::paymentsNeedUpgrade()) { if (!AxeptaXml::insertXmlToDb()) { return false; } } foreach ($sql as $query) { if (!Db::getInstance()->execute($query)) { return false; } } return true; }
💾 保存文件
← 返回文件管理器