Changeset 817 for trunk/Modules/NetworkConfig
- Timestamp:
- Mar 16, 2016, 8:51:59 PM (9 years ago)
- Location:
- trunk/Modules/NetworkConfig
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/NetworkConfig/Generate.php
r790 r817 13 13 if($Service['UNIX_TIMESTAMP(LastTime)'] < (time() - $Service['Period'])) 14 14 { 15 $System->Database->update('NetworkConfiguration', ' Id='.$Service['Id'], array('Changed' => 2));15 $System->Database->update('NetworkConfiguration', '`Id`='.$Service['Id'], array('Changed' => 2)); 16 16 $ExecutionStart = time(); 17 17 //echo($Service['Caption'].'...'); … … 27 27 //echo("Done\n"); 28 28 $ExecutionTime = time() - $ExecutionStart; 29 $System->Database->update('NetworkConfiguration', ' Id='.$Service['Id'], array('Changed' => 0, 'LastTime' => 'NOW()', 'ExecutionTime' => $ExecutionTime));30 $System->Database->update('NetworkConfiguration', ' Id='.$Service['Id'], array('Log' => implode("\n", $Output)));29 $System->Database->update('NetworkConfiguration', '`Id`='.$Service['Id'], array('Changed' => 0, 'LastTime' => 'NOW()', 'ExecutionTime' => $ExecutionTime)); 30 $System->Database->update('NetworkConfiguration', '`Id`='.$Service['Id'], array('Log' => implode("\n", $Output))); 31 31 } 32 32 } -
trunk/Modules/NetworkConfig/NetworkConfig.php
r781 r817 51 51 ), 52 52 )); 53 $this->System->FormManager->RegisterFormType('TNetworkConfigurationState', array( 54 'Type' => 'Enumeration', 55 'States' => array('Neplánováno', 'V plánu', 'Provádí se'), 56 )); 57 53 58 $this->System->RegisterCommandLine('config', array($this, 'Config')); 59 $this->System->Models['NetworkDevice']->RegisterOnChange('NetworkConfig', array($this, 'DoNetworkChange')); 60 $this->System->Models['NetworkInterface']->RegisterOnChange('NetworkConfig', array($this, 'DoNetworkChange')); 61 } 62 63 function DoNetworkChange() 64 { 65 $this->Database->query('UPDATE `NetworkConfiguration` SET `Changed`=1 WHERE '. 66 '(`Id`=1) OR (`Id`=7) OR (`Id`=8) OR (`Id`=9) OR (`Id`=10) OR (`Id`=11) OR (`Id`=12) OR (`Id`=13)'); 54 67 } 55 68
Note:
See TracChangeset
for help on using the changeset viewer.