From 94b7b4bcd401b0bed20118723a788523662adf4f Mon Sep 17 00:00:00 2001 From: Deon George Date: Fri, 11 Jan 2013 17:03:13 +1100 Subject: [PATCH] Fixes to list adsl services --- modules/service/classes/Model/Service.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/modules/service/classes/Model/Service.php b/modules/service/classes/Model/Service.php index 6fcd852a..e0be10d5 100644 --- a/modules/service/classes/Model/Service.php +++ b/modules/service/classes/Model/Service.php @@ -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; }