Merge pull request #162 from bumbu/patch-2
[-] CORE : updateMultishopTable() where argument is not mandatory anymore
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user