// Use Collection instead of HydrateCollection in several places

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10860 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2011-12-02 15:20:47 +00:00
parent 8bef192fcb
commit d76998340a
13 changed files with 97 additions and 99 deletions
+5 -14
View File
@@ -297,22 +297,13 @@ class SupplyOrderCore extends ObjectModel
/**
* Retrieves the product entries collection for the current order
*
* @return array
* @return Collection
*/
public function getEntriesCollection($id_lang = null)
public function getEntriesCollection()
{
if ($id_lang == null)
$id_lang = Context::getContext()->language->id;
// build query
$query = new DbQuery();
$query->select('s.*');
$query->from('supply_order_detail s');
$query->where('s.id_supply_order = '.(int)$this->id);
$results = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query);
return ObjectModel::hydrateCollection('SupplyOrderDetail', $results);
$details = new Collection('SupplyOrderDetail');
$details->where('a.id_supply_order = '.(int)$this->id);
return $details;
}