// Remove bad _SQL_USE_SLAVE_ uses + normalize Db->executeS(), Db->execute() and Db->numRows() names
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9178 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -335,7 +335,7 @@ class StockManagerCore implements StockManagerInterface
|
||||
if ($price_te != null)
|
||||
$query->where('price_te = '.(float)$price_te);
|
||||
|
||||
$results = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($query);
|
||||
$results = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query);
|
||||
|
||||
return ObjectModel::hydrateCollection('Stock', $results);
|
||||
}
|
||||
|
||||
@@ -161,7 +161,7 @@ class StockMvtCore extends ObjectModel
|
||||
) = 0
|
||||
GROUP BY s.id_product, s.id_shop
|
||||
HAVING qty <> 0';
|
||||
$products_without_attributes = Db::getInstance()->ExecuteS($sql);
|
||||
$products_without_attributes = Db::getInstance()->executeS($sql);
|
||||
|
||||
// Search missing stock movement on products with attributes
|
||||
$sql = 'SELECT s.id_stock, (stock.quantity - SUM(IFNULL(sm.quantity, 0))) AS qty
|
||||
@@ -176,7 +176,7 @@ class StockMvtCore extends ObjectModel
|
||||
) > 0
|
||||
GROUP BY s.id_product_attribute
|
||||
HAVING qty <> 0';
|
||||
$products_with_attributes = Db::getInstance()->ExecuteS($sql);
|
||||
$products_with_attributes = Db::getInstance()->executeS($sql);
|
||||
|
||||
// Add missing stock movements
|
||||
$products = array_merge($products_without_attributes, $products_with_attributes);
|
||||
|
||||
@@ -65,6 +65,6 @@ class StockMvtReasonCore extends ObjectModel
|
||||
$query->select('smrl.name, smr.id_stock_mvt_reason, smr.sign');
|
||||
$query->from('stock_mvt_reason smr');
|
||||
$query->leftjoin('stock_mvt_reason_lang smrl ON (smr.id_stock_mvt_reason = smrl.id_stock_mvt_reason AND smrl.id_lang='.(int)$id_lang.')');
|
||||
return Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($query);
|
||||
return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user