Ignore:
Timestamp:
Feb 3, 2016, 10:57:54 AM (9 years ago)
Author:
chronos
Message:
  • Fixed: Error using $System global variable instead of class fields.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/NetworkConfigRouterOS/Generators/NetwatchImport.php

    r785 r793  
    5656                TimeToMysqlDateTime($StartTime).'", NULL)');
    5757            // Update previous record duration in UpDown table
    58             $System->Database->query('UPDATE `NetworkInterfaceUpDown` AS `TM` SET `Duration` = TIMESTAMPDIFF(SECOND, '.
     58            $this->Database->query('UPDATE `NetworkInterfaceUpDown` AS `TM` SET `Duration` = TIMESTAMPDIFF(SECOND, '.
    5959                '`TM`.`Time`, (SELECT `Time` FROM (SELECT * FROM `NetworkInterfaceUpDown`) AS `TA` WHERE (`TA`.`Time` > `TM`.`Time`) '.
    6060                'AND (`TA`.`Interface`=`TM`.`Interface`) ORDER BY `TA`.`Time` ASC LIMIT 1)) '.
    6161                'WHERE (`TM`.`Duration` IS NULL) AND (`TM`.`Interface` ='.$Interface['Id'].')');
    62             $System->Database->update('NetworkInterface', '`Id` = "'.$Interface['Id'].'"',
     62            $this->Database->update('NetworkInterface', '`Id` = "'.$Interface['Id'].'"',
    6363                array('Online' => $Interface['NewOnline']));
    6464          }
     
    8484      {
    8585        if($Device['SumOnline'] > 0)
    86           $System->Database->update('NetworkDevice', 'Id='.$Device['Device'], array('LastOnline' => TimeToMysqlDateTime($StartTime), 'Online' => 1));
     86          $this->Database->update('NetworkDevice', 'Id='.$Device['Device'], array('LastOnline' => TimeToMysqlDateTime($StartTime), 'Online' => 1));
    8787      }
    8888      $DbResult = $this->Database->update('NetworkDevice', '`LastOnline` < "'.TimeToMysqlDateTime($StartTime).'"', array('Online' => 0));
Note: See TracChangeset for help on using the changeset viewer.