Changed use of active to status

This commit is contained in:
Deon George
2012-08-01 22:43:33 +10:00
parent e4d600b8d0
commit 4220ade8ac
40 changed files with 123 additions and 145 deletions

View File

@@ -25,7 +25,7 @@ class Model_ADSL_Supplier extends ORMOSB {
$a = $this->adsl_supplier_plan;
if ($active)
$a->where('status','=',TRUE);
$a->where_active();
return $a;
}
@@ -56,27 +56,18 @@ class Model_ADSL_Supplier extends ORMOSB {
// Start with all our ADSL Plans
foreach (ORM::factory('service')->list_bylistgroup('ADSL') as $so)
if (! $active OR $so->active)
if (! $active OR $so->status)
if (in_array($so->product->prod_plugin_data,$plans) OR in_array($so->plugin()->provided_adsl_plan_id,$plans))
array_push($services,$so);
// @todo poor cludge, we should find them without using list_bylistgroup()
if (! $services)
foreach (ORM::factory('service')->list_bylistgroup('HSPA') as $so)
if (! $active OR $so->active)
if (! $active OR $so->status)
if (in_array($so->product->prod_plugin_data,$plans) OR in_array($so->plugin()->provided_adsl_plan_id,$plans))
array_push($services,$so);
return $services;
}
/** LIST FUNCTIONS **/
/**
* Return a list of active suppliers
*/
public function list_active() {
return $this->where('status','=',1)->find_all();
}
}
?>