57 lines
1.8 KiB
PHP
57 lines
1.8 KiB
PHP
<?php
|
|
/**
|
|
* NOTICE OF LICENSE
|
|
*
|
|
* This source file is subject to a commercial license from MigrationPro MMC
|
|
* Use, copy, modification or distribution of this source file without written
|
|
* license agreement from the MigrationPro MMC is strictly forbidden.
|
|
* In order to obtain a license, please contact us: migrationprommc@gmail.com
|
|
*
|
|
* INFORMATION SUR LA LICENCE D'UTILISATION
|
|
*
|
|
* L'utilisation de ce fichier source est soumise a une licence commerciale
|
|
* concedee par la societe MigrationPro MMC
|
|
* Toute utilisation, reproduction, modification ou distribution du present
|
|
* fichier source sans contrat de licence ecrit de la part de la MigrationPro MMC est
|
|
* expressement interdite.
|
|
* Pour obtenir une licence, veuillez contacter la MigrationPro MMC a l'adresse: migrationprommc@gmail.com
|
|
*
|
|
* @author Edgar I.
|
|
* @copyright Copyright (c) 2012-2017 MigrationPro MMC
|
|
* @license Commercial license
|
|
* @package MigrationPro: Prestashop To PrestaShop
|
|
*/
|
|
|
|
class MigrationProDBWarningLogger extends ObjectModel
|
|
{
|
|
|
|
public $id;
|
|
|
|
public $log_text;
|
|
|
|
public $log_date_add;
|
|
|
|
public static $definition = array(
|
|
'table' => 'migrationpro_warning_logs',
|
|
'primary' => 'id',
|
|
'fields' => array(
|
|
'log_text' => array('type' => self::TYPE_STRING),
|
|
'log_date_add' => array('type' => self::TYPE_DATE),
|
|
),
|
|
);
|
|
|
|
public static function addWarningLog($logText)
|
|
{
|
|
$sql = "INSERT INTO " . _DB_PREFIX_ . "migrationpro_warning_logs SET log_text='" . pSQL($logText) . "', log_date_add='" . date('Y-m-d h:i:s', time()) . "'";
|
|
|
|
return Db::getInstance()->execute($sql);
|
|
}
|
|
|
|
public static function removeWarningLogs()
|
|
{
|
|
$sql = 'DELETE FROM ' . _DB_PREFIX_ . 'migrationpro_warning_logs';
|
|
|
|
return Db::getInstance()->execute($sql);
|
|
}
|
|
}
|