Many misc fixes
This commit is contained in:
@@ -70,11 +70,17 @@ class Service_Traffic_ADSL {
|
||||
* Traffic data from supplier
|
||||
*/
|
||||
public function update_traffic() {
|
||||
if (CLI::options('verbose'))
|
||||
echo ' - Last: '.date('Y-m-d',strtotime($this->last_update().'+1 day'))."\n";
|
||||
|
||||
$alreadyrun = FALSE;
|
||||
for ($querydate=date('Y-m-d',strtotime($this->last_update().'+1 day'));
|
||||
$querydate<=$this->today;
|
||||
$querydate=date('Y-m-d',strtotime($querydate.'+1 day'))) {
|
||||
|
||||
if (CLI::options('verbose'))
|
||||
echo " - Date: $querydate\n";
|
||||
|
||||
$goodfetch = false;
|
||||
// @todo log this fetch in a "log"
|
||||
|
||||
@@ -82,6 +88,9 @@ class Service_Traffic_ADSL {
|
||||
// Data returned should be in MB's
|
||||
$data = $this->getdata($querydate);
|
||||
|
||||
if (CLI::options('verbose'))
|
||||
print_r($data);
|
||||
|
||||
if (! $this->fetchresult) {
|
||||
echo 'Bad fetch'.get_class($this);
|
||||
break;
|
||||
|
Reference in New Issue
Block a user