// Add config/alias.php file + refactoring of DB / MySQL classes

This commit is contained in:
rMalie
2011-07-20 16:10:12 +00:00
parent 73d6f4267b
commit 766a38dcd7
19 changed files with 494 additions and 474 deletions
+3 -1
View File
@@ -185,7 +185,7 @@ class ShopCore extends ObjectModel
AND s.active = 1
AND s.deleted = 0';
if (!$id_shop = $db->getValue($sql))
$id_shop = Configuration::get('PS_SHOP_DEFAULT');
$id_shop = (int)Db::getInstance()->getValue('SELECT value FROM '._DB_PREFIX_.'configuration WHERE name = \'PS_SHOP_DEFAULT\'');
}
// Get instance of found shop
@@ -496,6 +496,8 @@ class ShopCore extends ObjectModel
}
else
{
if (!isset($context->shop))
return ($type == 'shop' || $type == 'group') ? '' : array('', '');
$shopID = (int)$context->shop->id_shop;
$shopGroupID = (int)$context->shop->id_group_shop;
}