ObjectModel::updateMultishopTable() where argument is not mandatory

This commit is contained in:
bumbu
2013-01-07 19:24:12 +02:00
parent 66ddc0c809
commit 0036768ae5
3 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -1284,7 +1284,7 @@ abstract class ObjectModelCore
* @param string $specific_where Only executed for common table * @param string $specific_where Only executed for common table
* @return bool * @return bool
*/ */
public static function updateMultishopTable($classname, $data, $where, $specific_where = '') public static function updateMultishopTable($classname, $data, $where = '', $specific_where = '')
{ {
$def = ObjectModel::getDefinition($classname); $def = ObjectModel::getDefinition($classname);
$update_data = array(); $update_data = array();
@@ -1304,8 +1304,8 @@ abstract class ObjectModelCore
$sql = 'UPDATE '._DB_PREFIX_.$def['table'].' a $sql = 'UPDATE '._DB_PREFIX_.$def['table'].' a
'.Shop::addSqlAssociation($def['table'], 'a', true, null, true).' '.Shop::addSqlAssociation($def['table'], 'a', true, null, true).'
SET '.implode(', ', $update_data).' SET '.implode(', ', $update_data).
WHERE '.$where; (!empty($where) ? ' WHERE '.$where : '');
return Db::getInstance()->execute($sql); return Db::getInstance()->execute($sql);
} }
+1 -1
View File
@@ -4609,7 +4609,7 @@ class ProductCore extends ObjectModel
{ {
return ObjectModel::updateMultishopTable('product', array( return ObjectModel::updateMultishopTable('product', array(
'ecotax' => 0, 'ecotax' => 0,
), ''); ));
} }
/** /**
+1 -1
View File
@@ -413,7 +413,7 @@ class SearchCore
{ {
$db->execute('TRUNCATE '._DB_PREFIX_.'search_index'); $db->execute('TRUNCATE '._DB_PREFIX_.'search_index');
$db->execute('TRUNCATE '._DB_PREFIX_.'search_word'); $db->execute('TRUNCATE '._DB_PREFIX_.'search_word');
ObjectModel::updateMultishopTable('Product', array('indexed' => 0), '1'); ObjectModel::updateMultishopTable('Product', array('indexed' => 0));
} }
else else
{ {