// Removed useless bit of code (retrieval of the manufacturer address in the constructor, 1 query each time, no use)

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16852 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
dMetzger
2012-08-14 14:26:40 +00:00
parent 15f21f853b
commit b2cd94475c
+1 -12
View File
@@ -103,8 +103,6 @@ class ManufacturerCore extends ObjectModel
{
parent::__construct($id, $id_lang);
/* Get the manufacturer's id_address */
$this->id_address = $this->getManufacturerAddress();
$this->link_rewrite = $this->getLink();
$this->image_dir = _PS_MANU_IMG_DIR_;
}
@@ -149,16 +147,7 @@ class ManufacturerCore extends ObjectModel
if (!(int)$this->id)
return false;
$result = Db::GetInstance(_PS_USE_SQL_SLAVE_)->getRow('
SELECT `id_address`
FROM '._DB_PREFIX_.'address
WHERE `id_manufacturer` = '.(int)$this->id
);
if (!$result)
return false;
return $result['id_address'];
return Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('SELECT `id_address` FROM '._DB_PREFIX_.'address WHERE `id_manufacturer` = '.(int)$this->id);
}
/**