Fixes to list adsl services

This commit is contained in:
Deon George 2013-01-11 17:03:13 +11:00
parent 217462f77e
commit 94b7b4bcd4

View File

@ -210,14 +210,9 @@ class Model_Service extends ORM_OSB {
$cats = ORM::factory('Product_Category')->list_bylistgroup($cat);
foreach ($this->list_active() as $so) {
if (! $so->product->avail_category OR ! preg_match('/^a:/',$so->product->avail_category))
continue;
$pc = unserialize($so->product->avail_category);
if (array_intersect($pc,array_keys($cats)))
foreach ($this->list_active() as $so)
if (array_intersect($so->product->avail_category,array_keys($cats)))
array_push($result,$so);
}
return $result;
}