Ignore:
Timestamp:
Mar 20, 2016, 10:33:00 PM (9 years ago)
Author:
chronos
Message:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/Network/Network.php

    r819 r820  
    206206      'AfterInsert' => array($this, 'AfterInsertNetworkInterface'),
    207207      'AfterModify' => array($this, 'AfterModifyNetworkInterface'),
     208      'BeforeDelete' => array($this, 'BeforeDeleteNetworkInterface'),
    208209      'AfterDelete' => array($this, 'AfterModifyNetworkInterface'),
    209210    ));
     
    676677  }
    677678 
     679  function BeforeDeleteNetworkInterface($Form, $Id)
     680  {
     681    $this->Database->query('DELETE FROM `NetworkInterfaceUpDown` WHERE `Interface`='.$Id);
     682    $this->Database->query('DELETE FROM `NetworkLink` WHERE `Interface1`='.$Id.' OR `Interface2`='.$Id);
     683    $this->Database->query('DELETE FROM `NetworkPort` WHERE `Interface`='.$Id);
     684    $this->Database->query('DELETE FROM `NetworkSignal` WHERE `Interface`='.$Id);
     685    $this->Database->query('DELETE FROM `NetworkInterfaceWireless` WHERE `Interface`='.$Id);
     686  }
     687
    678688  function ShowDashboardItem()
    679689  {
     
    712722      'LEFT JOIN `NetworkDevice` ON `NetworkDevice`.`Id` = `NetworkInterface`.`Device` '.
    713723      $Condition.' AND (`NetworkDevice`.`PermanentOnline`=1) AND (`NetworkDevice`.`Used`=1) AND '.
    714       '(`NetworkInterface`.`LocalIP` != "") AND (`NetworkInterface`.`Enabled` == 1)'.
     724      '(`NetworkInterface`.`LocalIP` != "") AND (`NetworkInterface`.`Enabled`=1)'.
    715725      'ORDER BY `Name` ASC');
    716726    if($DbResult3->num_rows > 0)
Note: See TracChangeset for help on using the changeset viewer.