Internal overhaul
This commit is contained in:
@@ -42,10 +42,10 @@ class Service_Traffic_ADSL_iiNetADSL extends Service_Traffic_ADSL {
|
||||
|
||||
// Find our services that need to be collected this way.
|
||||
$update = array();
|
||||
foreach ($this->so->services() as $so) {
|
||||
foreach ($this->aso->services() as $so) {
|
||||
if ($so->service_adsl->service_stats_collect AND $so->service_adsl->service_stats_lastupdate < $date) {
|
||||
$lastperiod = '';
|
||||
for ($servicedate=date('Y-m-d',strtotime($this->so->stats_lastupdate.'+1 day'));
|
||||
for ($servicedate=date('Y-m-d',strtotime($this->aso->stats_lastupdate.'+1 day'));
|
||||
$servicedate <= $this->today;
|
||||
$servicedate=date('Y-m-d',strtotime('+1 day',strtotime($servicedate)))) {
|
||||
|
||||
@@ -67,7 +67,7 @@ class Service_Traffic_ADSL_iiNetADSL extends Service_Traffic_ADSL {
|
||||
if ($debug AND file_exists($debug_file))
|
||||
$data = file_get_contents($debug_file);
|
||||
else
|
||||
$data = Remote::get($this->so->stats_url,$this->curlopts+array(CURLOPT_POSTFIELDS=>$postfields));
|
||||
$data = Remote::get($this->aso->stats_url,$this->curlopts+array(CURLOPT_POSTFIELDS=>$postfields));
|
||||
|
||||
// @todo There exists a possibility to skip a month, if we get a bad fetch on a previous month.
|
||||
if ($data)
|
||||
|
Reference in New Issue
Block a user