diff --git a/classes/ObjectModel.php b/classes/ObjectModel.php index d1cd8f5ad..264a174d9 100644 --- a/classes/ObjectModel.php +++ b/classes/ObjectModel.php @@ -1322,7 +1322,7 @@ abstract class ObjectModelCore * @param string $specific_where Only executed for common table * @return bool */ - public static function updateMultishopTable($classname, $data, $where, $specific_where = '') + public static function updateMultishopTable($classname, $data, $where = '', $specific_where = '') { $def = ObjectModel::getDefinition($classname); $update_data = array(); @@ -1342,8 +1342,8 @@ abstract class ObjectModelCore $sql = 'UPDATE '._DB_PREFIX_.$def['table'].' a '.Shop::addSqlAssociation($def['table'], 'a', true, null, true).' - SET '.implode(', ', $update_data).' - WHERE '.$where; + SET '.implode(', ', $update_data). + (!empty($where) ? ' WHERE '.$where : ''); return Db::getInstance()->execute($sql); } diff --git a/classes/Product.php b/classes/Product.php index 9b73d0dec..de39624d2 100644 --- a/classes/Product.php +++ b/classes/Product.php @@ -4751,7 +4751,7 @@ class ProductCore extends ObjectModel { return ObjectModel::updateMultishopTable('product', array( 'ecotax' => 0, - ), ''); + )); } /** @@ -5380,4 +5380,4 @@ class ProductCore extends ObjectModel Pack::addItem($this->id, (int)$item['id'], (int)$item['quantity']); return true; } -} \ No newline at end of file +} diff --git a/classes/Search.php b/classes/Search.php index 54e600011..eb3f0985e 100644 --- a/classes/Search.php +++ b/classes/Search.php @@ -410,7 +410,7 @@ class SearchCore { $db->execute('TRUNCATE '._DB_PREFIX_.'search_index'); $db->execute('TRUNCATE '._DB_PREFIX_.'search_word'); - ObjectModel::updateMultishopTable('Product', array('indexed' => 0), '1'); + ObjectModel::updateMultishopTable('Product', array('indexed' => 0)); } else {