// Normalize

This commit is contained in:
rMalie
2012-03-09 09:19:30 +00:00
parent 724c96fbde
commit 50a44277db
54 changed files with 297 additions and 320 deletions
+10 -10
View File
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>blockcategories</name>
<displayName><![CDATA[Categories block]]></displayName>
<version><![CDATA[2.0]]></version>
<description><![CDATA[Adds a block featuring product categories.]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[front_office_features]]></tab>
<is_configurable>1</is_configurable>
<need_instance>1</need_instance>
<module>
<name>blockcategories</name>
<displayName><![CDATA[Categories block]]></displayName>
<version><![CDATA[2.0]]></version>
<description><![CDATA[Adds a block featuring product categories.]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[front_office_features]]></tab>
<is_configurable>0</is_configurable>
<need_instance>1</need_instance>
<limited_countries></limited_countries>
</module>
</module>
+10 -10
View File
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>blocklayered</name>
<displayName><![CDATA[Layered navigation block]]></displayName>
<version><![CDATA[1.8.1]]></version>
<description><![CDATA[Displays a block with layered navigation filters.]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[front_office_features]]></tab>
<is_configurable>1</is_configurable>
<need_instance>0</need_instance>
<module>
<name>blocklayered</name>
<displayName><![CDATA[Layered navigation block]]></displayName>
<version><![CDATA[1.8.1]]></version>
<description><![CDATA[Displays a block with layered navigation filters.]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[front_office_features]]></tab>
<is_configurable>0</is_configurable>
<need_instance>0</need_instance>
<limited_countries></limited_countries>
</module>
</module>
+1 -1
View File
@@ -184,7 +184,7 @@ class BlockLink extends Module
}
$assos_shop = Tools::getValue('checkBoxShopAsso_blocklink');
Db::getInstance()->Execute('DELETE FROM '._DB_PREFIX_.'blocklink_shop WHERE id_blocklink='.(int)$id_link);
Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'blocklink_shop WHERE id_blocklink='.(int)$id_link);
foreach ($assos_shop as $asso)
foreach ($asso as $id_shop => $row)
Db::getInstance()->insert('blocklink_shop', array(
@@ -77,12 +77,12 @@ class Blockmyaccountfooter extends Module
private function addMyAccountBlockHook()
{
return Db::getInstance()->Execute('INSERT IGNORE INTO `'._DB_PREFIX_.'hook` (`name`, `title`, `description`, `position`) VALUES (\'myAccountBlockfooter\', \'My account block\', \'Display extra informations inside the "my account" block\', 1)');
return Db::getInstance()->execute('INSERT IGNORE INTO `'._DB_PREFIX_.'hook` (`name`, `title`, `description`, `position`) VALUES (\'myAccountBlockfooter\', \'My account block\', \'Display extra informations inside the "my account" block\', 1)');
}
private function removeMyAccountBlockHook()
{
return Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'hook` WHERE `name` = \'myAccountBlockfooter\'');
return Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'hook` WHERE `name` = \'myAccountBlockfooter\'');
}
public function hookHeader($params)
+10 -10
View File
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>blockstore</name>
<displayName><![CDATA[Stores block]]></displayName>
<version><![CDATA[1]]></version>
<description><![CDATA[Displays a block with a link to the store locator.]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[front_office_features]]></tab>
<is_configurable>1</is_configurable>
<need_instance>0</need_instance>
<module>
<name>blockstore</name>
<displayName><![CDATA[Stores block]]></displayName>
<version><![CDATA[1]]></version>
<description><![CDATA[Displays a block with a link to the store locator.]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[front_office_features]]></tab>
<is_configurable>0</is_configurable>
<need_instance>0</need_instance>
<limited_countries></limited_countries>
</module>
</module>
+10 -10
View File
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>blocktopmenu</name>
<displayName><![CDATA[Top horizontal menu]]></displayName>
<version><![CDATA[1.4]]></version>
<description><![CDATA[Add a new menu on top of your shop.]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[front_office_features]]></tab>
<is_configurable>1</is_configurable>
<need_instance>1</need_instance>
<module>
<name>blocktopmenu</name>
<displayName><![CDATA[Top horizontal menu]]></displayName>
<version><![CDATA[1.4]]></version>
<description><![CDATA[Add a new menu on top of your shop.]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[front_office_features]]></tab>
<is_configurable>0</is_configurable>
<need_instance>1</need_instance>
<limited_countries></limited_countries>
</module>
</module>
+3 -3
View File
@@ -216,7 +216,7 @@ XML;
/* Categories Generator */
if (Configuration::get('PS_REWRITING_SETTINGS'))
$categories = Db::getInstance()->ExecuteS('
$categories = Db::getInstance()->executeS('
SELECT c.id_category, c.level_depth, link_rewrite, DATE_FORMAT(IF(date_upd,date_upd,date_add), \'%Y-%m-%d\') AS date_upd, cl.id_lang
FROM '._DB_PREFIX_.'category c
LEFT JOIN '._DB_PREFIX_.'category_lang cl ON c.id_category = cl.id_category
@@ -224,7 +224,7 @@ XML;
WHERE l.`active` = 1 AND c.`active` = 1 AND c.id_category != 1
ORDER BY cl.id_category, cl.id_lang ASC');
else
$categories = Db::getInstance()->ExecuteS(
$categories = Db::getInstance()->executeS(
'SELECT c.id_category, c.level_depth, DATE_FORMAT(IF(date_upd,date_upd,date_add), \'%Y-%m-%d\') AS date_upd
FROM '._DB_PREFIX_.'category c
ORDER BY c.id_category ASC');
@@ -259,7 +259,7 @@ XML;
WHERE l.`active` = 1
ORDER BY cl.id_cms, cl.id_lang ASC';
$cmss = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($sql_cms);
$cmss = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql_cms);
foreach($cmss as $cms)
{
$tmpLink = Configuration::get('PS_REWRITING_SETTINGS') ?
+10 -10
View File
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>homeslider</name>
<displayName><![CDATA[Image slider for your homepage]]></displayName>
<version><![CDATA[1.1]]></version>
<description><![CDATA[Adds an image slider to your homepage.]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[front_office_features]]></tab>
<is_configurable>1</is_configurable>
<need_instance>0</need_instance>
<module>
<name>homeslider</name>
<displayName><![CDATA[Image slider for your homepage]]></displayName>
<version><![CDATA[1.1]]></version>
<description><![CDATA[Adds an image slider to your homepage.]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[front_office_features]]></tab>
<is_configurable>0</is_configurable>
<need_instance>0</need_instance>
<limited_countries></limited_countries>
</module>
</module>
+7 -7
View File
@@ -120,7 +120,7 @@ class importerosc extends ImportModule
{
$identifier = 'id_lang';
$langagues = $this->ExecuteS('
$langagues = $this->executeS('
SELECT languages_id as id_lang, name as name, code as iso_code, 1 as active, (\'m/j/Y\') as date_format_lite, (\'m/j/Y H:i:s\') as date_format_full
FROM `'.bqSQL($this->prefix).'languages`
LIMIT '.(int)$limit.' , '.(int)$nrb_import);
@@ -283,7 +283,7 @@ class importerosc extends ImportModule
ORDER BY p.`products_id`
LIMIT '.(int)($limit).' , '.(int)$nrb_import);
$this->Execute('CREATE TABLE IF NOT EXISTS`products_images` (
$this->execute('CREATE TABLE IF NOT EXISTS`products_images` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`products_id` int(11) NOT NULL,
`image` varchar(64) DEFAULT NULL,
@@ -302,7 +302,7 @@ class importerosc extends ImportModule
$product['link_rewrite'] = Tools::link_rewrite($product['name']);
$result = $this->ExecuteS('SELECT `categories_id` FROM `'.bqSQL($this->prefix).'products_to_categories` WHERE products_id = '.(int)$product['id_product']);
$result = $this->executeS('SELECT `categories_id` FROM `'.bqSQL($this->prefix).'products_to_categories` WHERE products_id = '.(int)$product['id_product']);
$category_product = array('category_product' => array($product['id_category_default'] => $product['id_product']));
foreach($result as $res)
$category_product['category_product'][$res['categories_id']] = $product['id_product'];
@@ -498,7 +498,7 @@ class importerosc extends ImportModule
public function checkCategoriesLevel()
{
$columns = $this->ExecuteS('SHOW COLUMNS FROM `'.bqSQL($this->prefix).'categories` ');
$columns = $this->executeS('SHOW COLUMNS FROM `'.bqSQL($this->prefix).'categories` ');
foreach($columns as $field)
if ($field['Field'] == 'level')
return true;
@@ -591,7 +591,7 @@ class importerosc extends ImportModule
public function createLevel()
{
return $this->Execute('ALTER TABLE `'.bqSQL($this->prefix).'categories` ADD `level` INT NOT NULL');
return $this->execute('ALTER TABLE `'.bqSQL($this->prefix).'categories` ADD `level` INT NOT NULL');
}
public function calculateLevel()
@@ -602,7 +602,7 @@ class importerosc extends ImportModule
public function updateLevel($ids_cat, $level = 1)
{
$this->Execute('
$this->execute('
UPDATE `'.bqSQL($this->prefix).'categories`
SET level = '.(int)$level.'
WHERE categories_id IN ('.implode(',', $ids_cat).')');
@@ -614,7 +614,7 @@ class importerosc extends ImportModule
public function getSubCat($id_parent)
{
$result = $this->ExecuteS('SELECT `categories_id` FROM `'.bqSQL($this->prefix).'categories` WHERE `parent_id`='.(int)$id_parent);
$result = $this->executeS('SELECT `categories_id` FROM `'.bqSQL($this->prefix).'categories` WHERE `parent_id`='.(int)$id_parent);
if (!is_array($result) OR empty($result))
return false;
return $this->formatCategoriesIds($result);
+1 -1
View File
@@ -251,7 +251,7 @@ class MailAlert extends ObjectModel
FROM `'._DB_PREFIX_.self::$definition['table'].'`
WHERE `id_product` = '.(int)$id_product.' AND `id_product_attribute` = '.(int)$id_product_attribute;
return Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($sql);
return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql);
}
}
+10 -10
View File
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>mailalerts</name>
<displayName><![CDATA[Mail alerts]]></displayName>
<version><![CDATA[2.4]]></version>
<description><![CDATA[Sends e-mail notifications to customers and merchants.]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[administration]]></tab>
<module>
<name>mailalerts</name>
<displayName><![CDATA[Mail alerts]]></displayName>
<version><![CDATA[2.4]]></version>
<description><![CDATA[Sends e-mail notifications to customers and merchants.]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[administration]]></tab>
<confirmUninstall>Are you sure you want to delete all customer notifications?</confirmUninstall>
<is_configurable>1</is_configurable>
<need_instance>1</need_instance>
<is_configurable>0</is_configurable>
<need_instance>1</need_instance>
<limited_countries></limited_countries>
</module>
</module>
+2 -2
View File
@@ -496,7 +496,7 @@ class MailAlerts extends Module
DELETE FROM `'._DB_PREFIX_.MailAlert::$definition['table'].'`
WHERE `id_product` = '.(int)$params['product']->id;
Db::getInstance()->Execute($sql);
Db::getInstance()->execute($sql);
}
public function hookActionAttributeDelete($params)
@@ -511,7 +511,7 @@ class MailAlerts extends Module
WHERE `id_product_attribute` = '.(int)$params['id_product_attribute'].'
AND `id_product` = '.(int)$params['id_product'];
Db::getInstance()->Execute($sql);
Db::getInstance()->execute($sql);
}
public function hookActionProductCoverage($params)
+3 -3
View File
@@ -1237,9 +1237,9 @@ class shopimporter extends ImportModule
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'country_lang');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'country');
case 'group' :
Db::getInstance()->Execute('TRUNCATE TABLE `'._DB_PREFIX_.'customer_group');
Db::getInstance()->Execute('TRUNCATE TABLE `'._DB_PREFIX_.'group_lang');
Db::getInstance()->Execute('TRUNCATE TABLE `'._DB_PREFIX_.'group');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'customer_group');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'group_lang');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'group');
break;
case 'combination' :
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_attribute');