Changed use of active to status
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
Reference in New Issue
Block a user