Ignore:
Timestamp:
May 11, 2022, 12:06:31 PM (3 years ago)
Author:
chronos
Message:
  • Fixed: PHP 8.1 related fixes.
File:
1 edited

Legend:

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

    r925 r928  
    785785  }
    786786
    787   function AfterInsertNetworkDevice(Form $Form): void
     787  function AfterInsertNetworkDevice(Form $Form, string $Id): array
    788788  {
    789789    $this->System->Models['NetworkDevice']->DoOnChange();
    790   }
    791 
    792   function AfterModifyNetworkDevice(Form $Form, string $Id): void
     790    return $Form->Values;
     791  }
     792
     793  function AfterModifyNetworkDevice(Form $Form, string $Id): array
    793794  {
    794795    $this->System->Models['NetworkDevice']->DoOnChange();
    795   }
    796 
    797   function AfterInsertNetworkInterface(Form $Form): void
     796    return $Form->Values;
     797  }
     798
     799  function AfterInsertNetworkInterface(Form $Form, string $Id): array
    798800  {
    799801    $this->System->Models['NetworkInterface']->DoOnChange();
    800   }
    801 
    802   function AfterModifyNetworkInterface(Form $Form, string $Id): void
     802    return $Form->Values;
     803  }
     804
     805  function AfterModifyNetworkInterface(Form $Form, string $Id): array
    803806  {
    804807    $this->System->Models['NetworkInterface']->DoOnChange();
     808    return $Form->Values;
    805809  }
    806810
     
    877881    $Output = '';
    878882    $Condition = 'WHERE (`NetworkInterface`.`LastOnline` <= "'.TimeToMysqlDateTime($Time - $MinDuration).'")';
    879     echo($OnlineNow);
    880883    if ($OnlineNow >= 0) $Condition .= ' AND (`NetworkInterface`.`Online` = '.$OnlineNow.')';
    881     echo($OnlinePrevious);
    882884    if ($OnlinePrevious >= 0) $Condition .= ' AND (`NetworkInterface`.`OnlineNotify` = '.$OnlinePrevious.')';
    883     echo($Condition."\n");
    884885    $DbResult3 = $this->Database->query('SELECT CONCAT_WS("-", `NetworkDevice`.`Name`, NULLIF(`NetworkInterface`.`Name`, "")) AS `Name`, '.
    885886      '`NetworkInterface`.`Online`, `NetworkInterface`.`LastOnline` FROM `NetworkInterface` '.
     
    918919    $NewOffline = $this->OnlineList('Nově offline', 0, 1, $this->MinNotifyTime);
    919920    $Output .= $NewOffline['Report'];
    920     $StillOffline = $this->OnlineList('Stále offline', 0, 0, 0);
    921     $Output .= $StillOffline['Report'];
     921    if ($Output != '')
     922    {
     923      $StillOffline = $this->OnlineList('Stále offline', 0, 0, 0);
     924      $Output .= $StillOffline['Report'];
     925    }
    922926    $Offline = $this->OnlineList('Offline', 0, -1, 0);
    923927    return array('Report' => $Output, 'Count' => $Offline['Count'], 'Title' => 'Odezva');
     
    970974    $NewOffline = $this->PortCheckList('Nově offline', 0, 1, $this->MinNotifyTime);
    971975    $Output .= $NewOffline['Report'];
    972     $StillOffline = $this->PortCheckList('Stále offline', 0, 0, 0);
    973     $Output .= $StillOffline['Report'];
     976    if ($Output != '')
     977    {
     978      $StillOffline = $this->PortCheckList('Stále offline', 0, 0, 0);
     979      $Output .= $StillOffline['Report'];
     980    }
    974981    $Offline = $this->PortCheckList('Offline', 0, -1, 0);
    975982    return array('Report' => $Output, 'Count' => $Offline['Count'], 'Title' => 'Port');
Note: See TracChangeset for help on using the changeset viewer.