[-] BO : fixed bug #PSCFV-3439

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16702 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
vAugagneur committed 2012-08-06 08:13:40 +00:00
1 parent af786b1e0a
commit 0cca874c81
1 file changed
+4 -4
+4 -4
View File
@@ -1157,17 +1157,17 @@ abstract class ObjectModelCore
} }
/** /**
* Check if there is entries in associated shop table for current entity * Check if there is more than one entries in associated shop table for current entity
* *
* @since 1.5.0 * @since 1.5.0
* @return bool * @return bool
*/ */
public function hasMultishopEntries() public function hasMultishopEntries()
{ {
if (!Shop::isTableAssociated($this->def['table'])) if (!Shop::isTableAssociated($this->def['table']) || !Shop::isFeatureActive())
return false; return false;
//check if there is more than one entries in associated shop table
return (bool)Db::getInstance()->getValue('SELECT COUNT(*) FROM `'._DB_PREFIX_.$this->def['table'].'_shop` WHERE `'.$this->def['primary'].'` = '.(int)$this->id); return (bool)(Db::getInstance()->getValue('SELECT COUNT(*) FROM `'._DB_PREFIX_.$this->def['table'].'_shop` WHERE `'.$this->def['primary'].'` = '.(int)$this->id) > 1);
} }
public function isMultishop() public function isMultishop()