Ignore:
Timestamp:
Apr 14, 2015, 10:20:16 PM (10 years ago)
Author:
chronos
Message:
  • Removed: Spaces on end of line.
  • Modified: Tabs converted to spaces.
File:
1 edited

Legend:

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

    r697 r738  
    2121  // Load netwatch status from all DHCP routers
    2222  $DbResult3 = $System->Database->query('SELECT `DHCP`, `AddressRange`, `Mask` FROM `NetworkSubnet` '.
    23                 'WHERE (`Configure` = 1) AND (`Member` IS NULL) GROUP BY DHCP');
     23    'WHERE (`Configure` = 1) AND (`Member` IS NULL) GROUP BY DHCP');
    2424  while($Subnet = $DbResult3->fetch_assoc())
    2525  {
     
    5454        array('LastOnline' => TimeToMysqlDateTime($StartTime)));
    5555
    56         if($Interface['Online'] != $Interface['NewOnline'])
     56    if($Interface['Online'] != $Interface['NewOnline'])
    5757    {
    58         // Online state changed
     58      // Online state changed
    5959      $DbResult = $System->Database->query('INSERT INTO `NetworkInterfaceUpDown` (`Interface`,
    60         `State`, `Time`, `Duration`) VALUES ('.$Interface['Id'].', '.$Interface['NewOnline'].', "'.
     60        `State`, `Time`, `Duration`) VALUES ('.$Interface['Id'].', '.$Interface['NewOnline'].', "'.
    6161         TimeToMysqlDateTime($StartTime).'", NULL)');
    6262      // Update previous record duration in UpDown table
     
    6464      '`TM`.`Time`, (SELECT `Time` FROM (SELECT * FROM `NetworkInterfaceUpDown`) AS `TA` WHERE (`TA`.`Time` > `TM`.`Time`) '.
    6565      'AND (`TA`.`Interface`=`TM`.`Interface`) ORDER BY `TA`.`Time` ASC LIMIT 1)) '.
    66         'WHERE (`TM`.`Duration` IS NULL) AND (`TM`.`Interface` ='.$Interface['Id'].')');
     66      'WHERE (`TM`.`Duration` IS NULL) AND (`TM`.`Interface` ='.$Interface['Id'].')');
    6767      $System->Database->update('NetworkInterface', '`Id` = "'.$Interface['Id'].'"',
    6868        array('Online' => $Interface['NewOnline']));
     
    7575  while($DbRow = $DbResult->fetch_assoc())
    7676  {
    77         echo('IP '.$DbRow['LocalIP'].' online but time not updated.'."\n");
     77    echo('IP '.$DbRow['LocalIP'].' online but time not updated.'."\n");
    7878  }
    7979  $DbResult = $System->Database->select('NetworkInterface', '*', '(`Online` = 0) AND '.
Note: See TracChangeset for help on using the changeset viewer.