- Timestamp:
- Dec 7, 2022, 12:25:42 AM (2 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Application/Version.php
r944 r945 1 1 <?php 2 2 3 $Revision = 94 3; // Subversion revision3 $Revision = 945; // Subversion revision 4 4 $DatabaseRevision = 939; // SQL structure revision 5 5 $ReleaseTime = strtotime('2022-12-06'); -
trunk/Modules/Network/Network.php
r944 r945 892 892 } 893 893 894 function OnlineList(string $Title, string $OnlineNow, string$OnlinePrevious, int $MinDuration): array894 function OnlineList(string $Title, int $OnlineNow, int $OnlinePrevious, int $MinDuration): array 895 895 { 896 896 $Time = time(); … … 899 899 $Condition = 'WHERE (`NetworkInterface`.`LastOnline` <= "'.TimeToMysqlDateTime($Time - $MinDuration).'")'; 900 900 if ($OnlineNow >= 0) $Condition .= ' AND (`NetworkInterface`.`Online` = '.$OnlineNow.')'; 901 if ($OnlinePrevious >= 0) $Condition .= ' AND (`NetworkInterface`.`OnlineNotify` = '.$OnlinePrevious.')'; 901 if ($OnlinePrevious >= 0) $Condition .= ' AND (`NetworkInterface`.`OnlineNotify` = '.$OnlinePrevious.')'; 902 902 $DbResult3 = $this->Database->query('SELECT CONCAT_WS("-", `NetworkDevice`.`Name`, NULLIF(`NetworkInterface`.`Name`, "")) AS `Name`, '. 903 903 '`NetworkInterface`.`Online`, `NetworkInterface`.`LastOnline` FROM `NetworkInterface` '. … … 925 925 $Output .= '</table><br/>'."\n"; 926 926 } 927 $this->Database->query('UPDATE `NetworkInterface` SET `OnlineNotify` = `Online` '. 928 $Condition); 927 928 if (($OnlineNow >= 0) and ($OnlinePrevious >= 0)) 929 { 930 $this->Database->query('UPDATE `NetworkInterface` SET `OnlineNotify` = `Online` '.$Condition); 931 } 929 932 return array('Report' => $Output, 'Count' => $DbResult3->num_rows); 930 933 } … … 945 948 } 946 949 947 function PortCheckList(string $Title, string $OnlineNow, string$OnlinePrevious, int $MinDuration): array950 function PortCheckList(string $Title, int $OnlineNow, int $OnlinePrevious, int $MinDuration): array 948 951 { 949 952 $Time = time(); … … 979 982 $Output .= '</table><br/>'."\n"; 980 983 } 981 $this->Database->query('UPDATE `NetworkPort` SET `OnlineNotify` = `Online` '. 982 $Condition); 984 985 if (($OnlineNow >= 0) and ($OnlinePrevious >= 0)) 986 { 987 $this->Database->query('UPDATE `NetworkPort` SET `OnlineNotify` = `Online` '.$Condition); 988 } 983 989 return array('Report' => $Output, 'Count' => $DbResult3->num_rows); 984 990 }
Note:
See TracChangeset
for help on using the changeset viewer.