From 452d1a8c23d40fbbba7016e7ee2d61af371705de Mon Sep 17 00:00:00 2001 From: vAugagneur Date: Mon, 6 Aug 2012 08:13:40 +0000 Subject: [PATCH] [-] BO : fixed bug #PSCFV-3439 --- classes/ObjectModel.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/classes/ObjectModel.php b/classes/ObjectModel.php index 920cb028e..3cc76ce34 100644 --- a/classes/ObjectModel.php +++ b/classes/ObjectModel.php @@ -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 * @return bool */ public function hasMultishopEntries() { - if (!Shop::isTableAssociated($this->def['table'])) + if (!Shop::isTableAssociated($this->def['table']) || !Shop::isFeatureActive()) return false; - - return (bool)Db::getInstance()->getValue('SELECT COUNT(*) FROM `'._DB_PREFIX_.$this->def['table'].'_shop` WHERE `'.$this->def['primary'].'` = '.(int)$this->id); + //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) > 1); } public function isMultishop()