Changeset 601
- Timestamp:
- Dec 7, 2013, 10:54:21 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Application/Version.php
r599 r601 1 1 <?php 2 2 3 $Revision = 599; // Subversion revision4 $DatabaseRevision = 597; // SQL structure revision5 $ReleaseTime = '2013-12-0 6';3 $Revision = 601; // Subversion revision 4 $DatabaseRevision = 601; // SQL structure revision 5 $ReleaseTime = '2013-12-07'; -
trunk/Common/Form/Types/Base.php
r581 r601 47 47 function OnFilterName($Item) 48 48 { 49 if($Item['SQL'] != '') $SQL = '('.$Item['SQL'].') AS '; 49 if(array_key_exists('SQL', $Item) and ($Item['SQL'] != '')) 50 $SQL = '('.$Item['SQL'].') AS '; 50 51 else $SQL = ''; 51 52 return($SQL.'`'.$Item['Name'].'`'); … … 54 55 function OnFilterNameQuery($Item) 55 56 { 56 if( $Item['SQL'] != '')57 if(array_key_exists('SQL', $Item) and ($Item['SQL'] != '')) 57 58 $Output = '('.$Item['SQL'].') AS `'.$Item['Name'].'`, ('.$Item['SQL'].') AS `'.$Item['Name'].'_Filter`'; 58 59 else $Output = '`'.$Item['Name'].'`, `'.$Item['Name'].'` AS `'.$Item['Name'].'_Filter`'; -
trunk/Common/Setup/Updates.php
r597 r601 463 463 } 464 464 465 function UpdateTo601($Manager) 466 { 467 $Manager->Execute('CREATE TABLE IF NOT EXISTS `NetworkInterfaceWireless` ( 468 `Id` int(11) NOT NULL AUTO_INCREMENT, 469 `NetworkInterface` int(11) NOT NULL, 470 `TxPower` int(11) NOT NULL, 471 `CableAttenuation` int(11) NOT NULL, 472 `AntenaGain` int(11) NOT NULL, 473 `Frequency` float NOT NULL, 474 `ChannelWidth` int(11) NOT NULL, 475 `SSID` varchar(255) NOT NULL, 476 PRIMARY KEY (`Id`), 477 KEY `NetworkInterface` (`NetworkInterface`) 478 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;'); 479 480 $Manager->Execute('ALTER TABLE `NetworkInterfaceWireless` 481 ADD CONSTRAINT `NetworkInterfaceWireless_ibfk_1` FOREIGN KEY (`NetworkInterface`) REFERENCES `NetworkInterface` (`Id`);'); 482 $Manager->Execute("INSERT INTO `centrala_big`.`Action` ( 483 `Id` ,`Name` ,`Title` ,`Type` ,`URL` ,`Group` ,`Icon` ,`PermissionOperation` , 484 `Enable`) VALUES (NULL , '', 'Wifi rozhraní', '1', '/is/?t=NetworkInterfaceWireless&a=list', NULL , NULL , NULL , '1' 485 );"); 486 $ActionId = $Manager->Database->insert_id; 487 $Manager->Execute("INSERT INTO `MenuItem` (`Id` ,`Name` ,`Parent` ,`Action` ,`Menu`) ". 488 "VALUES (NULL , 'Bezdrátové rozhraní', '1', '".$ActionId."', '1');"); 489 } 490 465 491 class Updates 466 492 { … … 492 518 584 => array('Revision' => 591, 'Function' => 'UpdateTo591'), 493 519 591 => array('Revision' => 597, 'Function' => 'UpdateTo597'), 520 597 => array('Revision' => 601, 'Function' => 'UpdateTo601'), 494 521 )); 495 522 } -
trunk/Modules/Network/Network.php
r586 r601 275 275 ), 276 276 )); 277 278 277 $this->System->FormManager->RegisterClass('NetworkInterfaceWireless', array( 278 'Title' => 'Bezdrátová rozhraní', 279 'Table' => 'NetworkInterfaceWireless', 280 'Items' => array( 281 'SSID' => array('Type' => 'String', 'Caption' => 'SSID', 'Default' => ''), 282 'NetworkInterface' => array('Type' => 'TNetworkInterface', 'Caption' => 'Rozhraní', 'Default' => ''), 283 'TxPower' => array('Type' => 'Integer', 'Caption' => 'Výstupní výkon', 'Default' => '18', 'Suffix' => 'dBm'), 284 'CableAttenuation' => array('Type' => 'Integer', 'Caption' => 'Útlum vedení', 'Default' => '0', 'Suffix' => 'dB'), 285 'AntenaGain' => array('Type' => 'Integer', 'Caption' => 'Zisk antény', 'Default' => '', 'Suffix' => 'dBi'), 286 'Frequency' => array('Type' => 'Float', 'Caption' => 'Frekvence', 'Default' => '5600', 'Suffix' => 'MHz'), 287 'ChannelWidth' => array('Type' => 'Integer', 'Caption' => 'Šírka kanálu', 'Default' => '20', 'Suffix' => 'MHz'), 288 'TotalPower' => array('Type' => 'Integer', 'Caption' => 'Celkový výkon', 'Default' => '20', 'Suffix' => 'dBm', 289 'SQL' => '(`TxPower` - `CableAttenuation` + `AntenaGain`)', 'ReadOnly' => true), 290 'LimitPower' => array('Type' => 'Integer', 'Caption' => 'Max. limit', 'Default' => '', 'Suffix' => 'dBm', 291 'ReadOnly' => true, 'SQL' => '(CASE WHEN `Frequency` >= 5450 AND `Frequency` <= 5725 THEN 27 ELSE 20 END)'), 292 'UnderLimit' => array('Type' => 'Boolean', 'Caption' => 'V limitu', 'Default' => '', 'Suffix' => '', 293 'ReadOnly' => true, 'SQL' => '((`TxPower` - `CableAttenuation` + `AntenaGain`) <= (CASE WHEN `Frequency` >= 5450 AND `Frequency` <= 5725 THEN 27 ELSE 20 END))'), 294 ), 295 )); 279 296 } 280 297
Note:
See TracChangeset
for help on using the changeset viewer.