Changeset 615


Ignore:
Timestamp:
Dec 20, 2013, 11:57:02 PM (11 years ago)
Author:
chronos
Message:
  • Přidáno: Další položky do tabulky "Bezdrátové rozhraní".
  • Přidáno: Příprava tabulky NewsImport pro zobecnění importu aktualit z jiných webů.
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Application/FormClasses.php

    r605 r615  
    171171    'States' => array('Neplánováno', 'V plánu', 'Provádí se'),
    172172  ),   
     173  'TAntennaPolarity' => array(
     174    'Type' => 'Enumeration',
     175    'States' => array('Vertikální', 'Horizontální', 'Kruhová', 'Vertikální i horizontální'),
     176  ),   
    173177  'TNetworkDeviceState' => array(
    174178    'Type' => 'Enumeration',
  • trunk/Application/Version.php

    r614 r615  
    11<?php
    22
    3 $Revision = 614; // Subversion revision
    4 $DatabaseRevision = 601; // SQL structure revision
     3$Revision = 615; // Subversion revision
     4$DatabaseRevision = 615; // SQL structure revision
    55$ReleaseTime = '2013-12-20';
  • trunk/Common/Setup/Updates.php

    r610 r615  
    489489}
    490490
     491function UpdateTo615($Manager)
     492{
     493  $Manager->Execute('ALTER TABLE `NetworkInterfaceWireless` ADD `AntennaPolarity` INT NOT NULL ,
     494ADD `Description` VARCHAR( 255 ) NOT NULL ;');
     495  $Manager->Execute('CREATE TABLE IF NOT EXISTS `NewsImport` (
     496  `Id` int(11) NOT NULL,
     497  `Name` varchar(255) NOT NULL,
     498  `Enabled` int(11) NOT NULL,
     499  `Source` varchar(255) NOT NULL,
     500  `Category` int(11) NOT NULL,
     501  `BlockStart` varchar(255) NOT NULL,
     502  `BlockEnd` varchar(255) NOT NULL,
     503  `ItemStart` varchar(255) NOT NULL,
     504  `ItemEnd` varchar(255) NOT NULL,
     505  `TitleStart` varchar(255) NOT NULL,
     506  `TitleEnd` varchar(255) NOT NULL,
     507  `ContentStart` varchar(255) NOT NULL,
     508  `ContentEnd` varchar(255) NOT NULL,
     509  `LinkStart` varchar(255) NOT NULL,
     510  `LinkEnd` varchar(255) NOT NULL,
     511  `DateStart` varchar(255) NOT NULL,
     512  `DateEnd` varchar(255) NOT NULL,
     513  KEY `Category` (`Category`)
     514) ENGINE=InnoDB DEFAULT CHARSET=utf8;');
     515  $Manager->Execute('ALTER TABLE `NewsImport` '.
     516    'ADD CONSTRAINT `NewsImport_ibfk_1` FOREIGN KEY (`Category`) '.
     517    ' REFERENCES `NewsCategory` (`Id`);');
     518  $Manager->Execute('ALTER TABLE `NetworkInterfaceWireless` ADD `Product` INT NULL AFTER `AntennaPolarity` ,
     519ADD INDEX ( `Product` ) ;');
     520  $Manager->Execute('ALTER TABLE `NetworkInterfaceWireless` ADD FOREIGN KEY ( `Product` ) REFERENCES `Product` (
     521`Id`) ON DELETE RESTRICT ON UPDATE RESTRICT ;');
     522  $Manager->Execute('ALTER TABLE `NetworkInterfaceWireless` ADD `MAC` VARCHAR( 17 ) NOT NULL ;');
     523}
     524
    491525class Updates
    492526{
     
    519553      591 => array('Revision' => 597, 'Function' => 'UpdateTo597'),
    520554      597 => array('Revision' => 601, 'Function' => 'UpdateTo601'),
     555      601 => array('Revision' => 615, 'Function' => 'UpdateTo615'),
    521556    ));
    522557  }
  • trunk/Modules/Network/Network.php

    r605 r615  
    280280      'Items' => array(
    281281        'SSID' => array('Type' => 'String', 'Caption' => 'SSID', 'Default' => ''),
     282        'MAC' => array('Type' => 'MacAddress', 'Caption' => 'MAC', 'Default' => ''),
    282283        'NetworkInterface' => array('Type' => 'TNetworkInterface', 'Caption' => 'Rozhraní', 'Default' => ''),
    283284        'TxPower' => array('Type' => 'Integer', 'Caption' => 'Výstupní výkon', 'Default' => '18', 'Suffix' => 'dBm'),
    284285        'CableAttenuation' => array('Type' => 'Integer', 'Caption' => 'Útlum vedení', 'Default' => '0', 'Suffix' => 'dB'),
     286        'Antenna' => array('Type' => 'TProduct', 'Caption' => 'Anténa', 'Default' => '', 'Null' => true),
    285287        'AntenaGain' => array('Type' => 'Integer', 'Caption' => 'Zisk antény', 'Default' => '', 'Suffix' => 'dBi'),
     288        'AntennaPolarity' => array('Type' => 'TAntennaPolarity', 'Caption' => 'Polarizace antény', 'Default' => '0'),
    286289        'Frequency' => array('Type' => 'Float', 'Caption' => 'Frekvence', 'Default' => '5600', 'Suffix' => 'MHz'),
    287290        'ChannelWidth' => array('Type' => 'Integer', 'Caption' => 'Šírka kanálu', 'Default' => '20', 'Suffix' => 'MHz'),
     
    292295        'UnderLimit' => array('Type' => 'Boolean', 'Caption' => 'V limitu', 'Default' => '', 'Suffix' => '',
    293296          'ReadOnly' => true, 'SQL' => '((`TxPower` - `CableAttenuation` + `AntenaGain`) <= (CASE WHEN `Frequency` >= 5450 AND `Frequency` <= 5725 THEN 27 ELSE 20 END))'),
     297        'Description' => array('Type' => 'String', 'Caption' => 'Popis', 'Default' => ''),
    294298      ),
    295299    ));
  • trunk/Modules/NetworkConfigRouterOS/Generators/FirewallNAT.php

    r548 r615  
    4545  $DbResult2 = $System->Database->query('SELECT `NetworkInterface`.*, `NetworkDevice`.`Name` AS `DeviceName`, `NetworkDevice`.`InboundNATPriority` FROM `NetworkInterface`'.
    4646  ' LEFT JOIN `NetworkDevice` ON `NetworkDevice`.`Id` = `NetworkInterface`.`Device` WHERE (`NetworkInterface`.`ExternalIP` <> "")'.
     47  ' AND (`NetworkInterface`.`LocalIP` <> "")'. 
    4748  ' AND (`NetworkDevice`.`Member` = '.$Member['Id'].') AND (`NetworkInterface`.`LocalIP` != `NetworkInterface`.`ExternalIP`) ORDER BY `id` DESC');
    4849  while($Interface = $DbResult2->fetch_assoc())
     
    101102
    102103// Masquerade hosts without public ip
    103 $Items[] = array('chain' => 'inet-out', 'action' => 'src-nat', 'to-addresses' => '77.92.221.106', 'comment' => 'Default_NAT');
     104$Items[] = array('chain' => 'inet-out', 'action' => 'src-nat', 'to-addresses' => '77.92.221.188', 'comment' => 'Default_NAT');
    104105
    105106// Redirect DNS port
  • trunk/Modules/SpeedTest/SpeedTest.php

    r586 r615  
    2828  {
    2929    $this->System->Pages['speedtest'] = 'PageSpeedTest';
    30    
    3130  } 
    3231}
Note: See TracChangeset for help on using the changeset viewer.