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();
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
@@ -160,7 +160,7 @@ class Service_Traffic_ADSL_ExetelHSPA extends Service_Traffic_ADSL {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// If we got here and have data, we had a good fetch, update the stats date
|
||||
$so->plugin()->service_stats_lastupdate = $lastday;
|
||||
$so->plugin()->save();
|
||||
|
@@ -153,7 +153,7 @@ class Service_Traffic_ADSL_ExetelPE extends Service_Traffic_ADSL {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// If we got here and have data, we had a good fetch, update the stats date
|
||||
$so->plugin()->service_stats_lastupdate = $lastday;
|
||||
$so->plugin()->save();
|
||||
|
@@ -89,7 +89,7 @@ class Service_Traffic_ADSL_iiNetADSL extends Service_Traffic_ADSL {
|
||||
|
||||
foreach ($day_hour->get('usage') as $usage) {
|
||||
$fields = $usage->attributes();
|
||||
|
||||
|
||||
// If we find a field we dont understand, we'll return.
|
||||
if (empty($fields['type']) OR empty($this->fields[$fields['type']]))
|
||||
return array();
|
||||
|
Reference in New Issue
Block a user