Ignore:
Timestamp:
Nov 20, 2020, 12:08:12 AM (4 years ago)
Author:
chronos
Message:
  • Added: Static types added to almost all classes, methods and function. Supported by PHP 7.4.
  • Fixed: Various found code issues.
Location:
trunk/Modules/NetworkConfigRouterOS
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/NetworkConfigRouterOS/Generators/DHCP.php

    r873 r887  
    44class ConfigRouterOSDHCP extends NetworkConfigItem
    55{
    6   function Run()
     6  function Run(): void
    77  {
    88    $Path = array('ip', 'dhcp-server', 'lease');
  • trunk/Modules/NetworkConfigRouterOS/Generators/DNS.php

    r873 r887  
    33class ConfigRouterOSDNS extends NetworkConfigItem
    44{
    5   function Run()
     5  function Run(): void
    66  {
    77    $Path = array('ip', 'dns', 'static');
  • trunk/Modules/NetworkConfigRouterOS/Generators/FirewallFilter.php

    r873 r887  
    33class ConfigRouterOSFirewallFilter extends NetworkConfigItem
    44{
    5   function Run()
     5  function Run(): void
    66  {
    77    $Path = array('ip', 'firewall', 'filter');
  • trunk/Modules/NetworkConfigRouterOS/Generators/FirewallMangle.php

    r873 r887  
    33class ConfigRouterOSFirewallMangle extends NetworkConfigItem
    44{
    5   function ProcessNode($Node)
     5  function ProcessNode($Node): void
    66  {
    77    global $InetInterface, $ItemsFirewall;
    88
    9     foreach ($Node['Items'] as $Index => $Item)
     9    foreach ($Node['Items'] as $Item)
    1010    {
    1111      if (count($Item['Items']) == 0)
     
    4747  }
    4848
    49   function Run()
     49  function Run(): void
    5050  {
    5151    $this->RunIPv4();
     
    5353  }
    5454
    55   function RunIPv4()
     55  function RunIPv4(): void
    5656  {
    5757    global $ItemsFirewall;
     
    149149  }
    150150
    151   function RunIPv6()
     151  function RunIPv6(): void
    152152  {
    153153    global $ItemsFirewall;
  • trunk/Modules/NetworkConfigRouterOS/Generators/FirewallNAT.php

    r873 r887  
    33class ConfigRouterOSFirewallNAT extends NetworkConfigItem
    44{
    5   function Run()
     5  function Run(): void
    66  {
    77    $Path = array('ip', 'firewall', 'nat');
  • trunk/Modules/NetworkConfigRouterOS/Generators/Netwatch.php

    r873 r887  
    33class ConfigRouterOSNetwatch extends NetworkConfigItem
    44{
    5   function Run()
     5  function Run(): void
    66  {
    77    $Path = array('tool', 'netwatch');
  • trunk/Modules/NetworkConfigRouterOS/Generators/NetwatchImport.php

    r873 r887  
    33class ConfigRouterOSNetwatchImport extends NetworkConfigItem
    44{
    5   function NetwatchImport()
     5  function NetwatchImport(): void
    66  {
    77    $StartTime = time();
     
    4444    $Queries = array();
    4545    $QueriesInsert = array();
    46     foreach ($Interfaces as $Index => $Interface)
     46    foreach ($Interfaces as $Interface)
    4747    {
    4848      // Update last online time if still online
     
    103103  }
    104104
    105   function Run()
     105  function Run(): void
    106106  {
    107107    RepeatFunction(10, array($this, 'NetwatchImport'));
  • trunk/Modules/NetworkConfigRouterOS/Generators/Queue.php

    r873 r887  
    1414  }
    1515
    16   function Print()
     16  function Print(): string
    1717  {
    1818    $Output = '(Min: '.$this->Min.' Max: '.$this->Max;
     
    4646  }
    4747
    48   function CheckName($Name, &$UsedNames)
     48  function CheckName($Name, &$UsedNames): void
    4949  {
    5050    if (in_array($Name, $UsedNames)) die("\n".'Duplicate name: '.$Name);
     
    5252  }
    5353
    54   function GetCommands(&$UsedNames = null)
     54  function GetCommands(&$UsedNames = null): array
    5555  {
    5656    if ($UsedNames == null) $UsedNames = array();
     
    7272  }
    7373
    74   function GetParentName(string $Suffix)
     74  function GetParentName(string $Suffix): string
    7575  {
    7676    if ($this->Parent != null) return $this->Parent->Name.$Suffix;
     
    7878  }
    7979
    80   function UpdateMinSpeeds()
     80  function UpdateMinSpeeds(): void
    8181  {
    8282    if (($this->LimitIn->Min == 0) or ($this->LimitOut->Min == 0))
     
    100100class SpeedLimitItems extends GenericList
    101101{
    102   function AddNew(string $Name, SpeedLimitItem $Parent = null)
     102  function AddNew(string $Name, SpeedLimitItem $Parent = null): SpeedLimitItem
    103103  {
    104104    $Item = new SpeedLimitItem($Name, $Parent);
    105     $Item->LimitIn = new SpeedLimit();
    106     $Item->LimitOut = new SpeedLimit();
     105    $Item->LimitIn = new SpeedLimit(0, 0);
     106    $Item->LimitOut = new SpeedLimit(0, 0);
    107107    $this->Items[] = $Item;
    108108    return $Item;
     
    119119  }
    120120
    121   function GetCommands(&$UsedNames)
     121  function GetCommands(&$UsedNames): array
    122122  {
    123123    $Output = array();
     
    137137  var $SpeedLimits;
    138138
    139   function Run()
     139  function Run(): void
    140140  {
    141141    $PathQueue = array('queue', 'tree');
     
    149149    $this->UsedNames = array();
    150150
    151     $Finance = &$this->System->Modules['Finance'];
     151    $Finance = &ModuleFinance::Cast($this->System->GetModule('Finance'))->Finance;
    152152    $Finance->LoadMonthParameters(0);
    153153
     
    280280  }
    281281
    282   function BuildSpeedLimit(&$SpeedLimit, $TopSpeedLimitItem)
     282  function BuildSpeedLimit(&$SpeedLimit, $TopSpeedLimitItem): void
    283283  {
    284284    $SpeedLimitName = $SpeedLimit['Name'].'-grp';
     
    297297  }
    298298
    299   function LoadSpeedLimits($SpeedLimitItem)
     299  function LoadSpeedLimits($SpeedLimitItem): void
    300300  {
    301301    echo('Limit groups: ');
     
    326326  }
    327327
    328   function UpdateMinSpeed($DeviceId)
     328  function UpdateMinSpeed($DeviceId): void
    329329  {
    330330    $MinSpeed = 0;
     
    340340
    341341  // Calculate maximum real speed available for each network device Start with main router and continue with adjecement nodes.
    342   function BuildTree($RootDeviceId, $BaseSpeed)
     342  function BuildTree($RootDeviceId, $BaseSpeed): void
    343343  {
    344344    // Load network devices
     
    438438  }
    439439
    440   function BuildQueueItems($DeviceId, $SpeedLimitParent)
     440  function BuildQueueItems($DeviceId, $SpeedLimitParent): void
    441441  {
    442442    $Device = $this->Devices[$DeviceId];
     
    475475  }
    476476
    477   function RunTopology()
     477  function RunTopology(): void
    478478  {
    479479    $PathQueue = array('queue', 'tree');
     
    487487    $this->UsedNames = array();
    488488
    489     $Finance = &$this->System->Modules['Finance'];
     489    $Finance = &ModuleFinance::Cast($this->System->GetModule('Finance'))->Finance;
    490490    $Finance->LoadMonthParameters(0);
    491491
  • trunk/Modules/NetworkConfigRouterOS/Generators/Signal.php

    r874 r887  
    33class ConfigRouterOSSignal extends NetworkConfigItem
    44{
    5   function ReadWirelessRegistration()
     5  function ReadWirelessRegistration(): void
    66  {
    77    $Time = time();
     
    6666    $this->Database->Transaction($Queries);
    6767  }
    68  
    69   function StripUnits($Value)
     68
     69  function StripUnits($Value): string
    7070  {
    7171    if (strpos($Value, '-') !== false) $Value = substr($Value, 0, strpos($Value, '-') - 1); // without channel info
    7272    if (substr($Value, -3, 3) == "MHz") $Value = substr($Value, 0, -3); // without MHz unit
    73     if (substr($Value, -4, 4) == "Mbps") $Value = substr($Value, 0, -4); // without Mbps unit   
    74     if (substr($Value, -3, 3) == "Mbp") $Value = substr($Value, 0, -3); // without Mbp unit   
     73    if (substr($Value, -4, 4) == "Mbps") $Value = substr($Value, 0, -4); // without Mbps unit
     74    if (substr($Value, -3, 3) == "Mbp") $Value = substr($Value, 0, -3); // without Mbp unit
    7575    if (substr($Value, -1, 1) == "M") $Value = substr($Value, 0, -1); // without M unit
    7676    return $Value;
    7777  }
    7878
    79   function Run()
     79  function Run(): void
    8080  {
    8181    RepeatFunction(60 * 60, array($this, 'ReadWirelessRegistration'));
  • trunk/Modules/NetworkConfigRouterOS/NetworkConfigRouterOS.php

    r874 r887  
    1818class ModuleNetworkConfigRouterOS extends AppModule
    1919{
    20   function __construct($System)
     20  function __construct(System $System)
    2121  {
    2222    parent::__construct($System);
     
    2929  }
    3030
    31   function DoInstall()
     31  function DoInstall(): void
    3232  {
    3333  }
    3434
    35   function DoUnInstall()
     35  function DoUnInstall(): void
    3636  {
    3737  }
    3838
    39   function DoStart()
     39  function DoStart(): void
    4040  {
    4141    $this->System->Pages['zdarma'] = 'PageFreeAccess';
    42     $this->System->ModuleManager->Modules['NetworkConfig']->RegisterConfigItem('routeros-dns', 'ConfigRouterOSDNS');
    43     $this->System->ModuleManager->Modules['NetworkConfig']->RegisterConfigItem('routeros-dhcp', 'ConfigRouterOSDHCP');
    44     $this->System->ModuleManager->Modules['NetworkConfig']->RegisterConfigItem('routeros-signal', 'ConfigRouterOSSignal');
    45     $this->System->ModuleManager->Modules['NetworkConfig']->RegisterConfigItem('routeros-netwatch', 'ConfigRouterOSNetwatch');
    46     $this->System->ModuleManager->Modules['NetworkConfig']->RegisterConfigItem('routeros-netwatch-import', 'ConfigRouterOSNetwatchImport');
    47     $this->System->ModuleManager->Modules['NetworkConfig']->RegisterConfigItem('routeros-firewall-filter', 'ConfigRouterOSFirewallFilter');
    48     $this->System->ModuleManager->Modules['NetworkConfig']->RegisterConfigItem('routeros-firewall-nat', 'ConfigRouterOSFirewallNAT');
    49     $this->System->ModuleManager->Modules['NetworkConfig']->RegisterConfigItem('routeros-firewall-mangle', 'ConfigRouterOSFirewallMangle');
    50     $this->System->ModuleManager->Modules['NetworkConfig']->RegisterConfigItem('routeros-queue', 'ConfigRouterOSQueue');
     42    ModuleNetworkConfig::Cast($this->System->GetModule('NetworkConfig'))->RegisterConfigItem('routeros-dns', 'ConfigRouterOSDNS');
     43    ModuleNetworkConfig::Cast($this->System->GetModule('NetworkConfig'))->RegisterConfigItem('routeros-dhcp', 'ConfigRouterOSDHCP');
     44    ModuleNetworkConfig::Cast($this->System->GetModule('NetworkConfig'))->RegisterConfigItem('routeros-signal', 'ConfigRouterOSSignal');
     45    ModuleNetworkConfig::Cast($this->System->GetModule('NetworkConfig'))->RegisterConfigItem('routeros-netwatch', 'ConfigRouterOSNetwatch');
     46    ModuleNetworkConfig::Cast($this->System->GetModule('NetworkConfig'))->RegisterConfigItem('routeros-netwatch-import', 'ConfigRouterOSNetwatchImport');
     47    ModuleNetworkConfig::Cast($this->System->GetModule('NetworkConfig'))->RegisterConfigItem('routeros-firewall-filter', 'ConfigRouterOSFirewallFilter');
     48    ModuleNetworkConfig::Cast($this->System->GetModule('NetworkConfig'))->RegisterConfigItem('routeros-firewall-nat', 'ConfigRouterOSFirewallNAT');
     49    ModuleNetworkConfig::Cast($this->System->GetModule('NetworkConfig'))->RegisterConfigItem('routeros-firewall-mangle', 'ConfigRouterOSFirewallMangle');
     50    ModuleNetworkConfig::Cast($this->System->GetModule('NetworkConfig'))->RegisterConfigItem('routeros-queue', 'ConfigRouterOSQueue');
    5151  }
    5252}
     
    5454class PageFreeAccess extends Page
    5555{
    56   var $FullTitle = 'Přístup zdarma k Internetu';
    57   var $ShortTitle = 'Internet zdarma';
    58   var $ParentClass = 'PagePortal';
    59   var $AddressList = 'free-access';
    60   var $Timeout;
     56  public string $AddressList = 'free-access';
     57  public int $Timeout;
    6158
    62   function __construct($System)
     59  function __construct(System $System)
    6360  {
    6461    parent::__construct($System);
     62    $this->FullTitle = 'Přístup zdarma k Internetu';
     63    $this->ShortTitle = 'Internet zdarma';
     64    $this->ParentClass = 'PagePortal';
     65
    6566    $this->Timeout = 24 * 60 * 60;
    6667  }
    6768
    68   function Show()
     69  function Show(): string
    6970  {
    7071    $IPAddress = GetRemoteAddress();
    7172    $Output = 'Vaše IP adresa je: '.$IPAddress.'<br/>';
    72     if (IsInternetAddr($IPAddress)) {
     73    if (IsInternetAddr($IPAddress))
     74    {
    7375      $Output .= '<p>Internet zdarma je dostupný pouze z vnitřní sítě.</p>';
    7476      return $Output;
     
    117119class ScheduleConfigureFreeAccess extends SchedulerTask
    118120{
    119   function Execute()
     121  function Execute(): string
    120122  {
    121123    $Output = '';
  • trunk/Modules/NetworkConfigRouterOS/Routerboard.php

    r874 r887  
    1919  }
    2020
    21   function Execute($Commands)
     21  function Execute(array $Commands): array
    2222  {
    2323    $Output = array();
     
    4444  }
    4545
    46   function ExecuteBatch($Commands)
     46  function ExecuteBatch(string $Commands): string
    4747  {
    4848    $Commands = trim($Commands);
     
    6565  }
    6666
    67   function ItemGet($Path)
     67  function ItemGet(array $Path): array
    6868  {
    6969    $Result = $this->Execute(implode(' ', $Path).' print');
     
    8282  }
    8383
    84   function ListGet($Path, $Properties, $Conditions = array())
     84  function ListGet(array $Path, array $Properties, array $Conditions = array()): array
    8585  {
    8686    $PropertyList = '"';
     
    116116  }
    117117
    118   function ListGetPrint($Path, $Properties, $Conditions = array())
     118  function ListGetPrint($Path, $Properties, $Conditions = array()): array
    119119  {
    120120    $ConditionList = '';
     
    151151  }
    152152
    153   function ListEraseAll($Path)
     153  function ListEraseAll(array $Path): void
    154154  {
    155155    $this->Execute(implode(' ', $Path).' { remove [find] }');
    156156  }
    157157
    158   function ListUpdate($Path, $Properties, $Values, $Condition = array(), $UsePrint = false)
     158  function ListUpdate(array $Path, array $Properties, array $Values, array $Condition = array(), bool $UsePrint = false): array
    159159  {
    160160    // Get current list from routerboard
  • trunk/Modules/NetworkConfigRouterOS/Routerboard2.php

    r874 r887  
    1111  );
    1212
    13   function Execute($Commands)
     13  function Execute($Commands): array
    1414  {
    1515    if (is_array($Commands)) $Commands = implode(';', $Commands);
     
    1717  }
    1818
    19   function GetItem($Command)
     19  function GetItem($Command): array
    2020  {
    2121    $Result = $this->Execute($Command);
     
    2525    {
    2626      $ResultLineParts = explode(' ', trim($ResultLine));
    27       if ($ResultLineParts[1]{0} == '"') $ResultLineParts[1] = substr($ResultLineParts[1], 1, -1); // Remove quotes
     27      if ($ResultLineParts[1][0] == '"') $ResultLineParts[1] = substr($ResultLineParts[1], 1, -1); // Remove quotes
    2828      $List[substr($ResultLineParts[0], 0, -1)] = $ResultLineParts[1];
    2929    }
     
    3131  }
    3232
    33   function GetList($Command, $Properties)
     33  function GetList($Command, $Properties): array
    3434  {
    3535    $PropertyList = '"';
     
    5555  }
    5656
    57   function GetSystemResource()
     57  function GetSystemResource(): array
    5858  {
    5959    return $this->GetItem('/system resource print');
    6060  }
    6161
    62   function GetFirewallFilterList()
     62  function GetFirewallFilterList(): array
    6363  {
    6464    return $this->GetList('/ip firewall nat', array('src-address', 'dst-address', 'bytes'));
    6565  }
    6666
    67   function GetDHCPServerLeasesList()
     67  function GetDHCPServerLeasesList(): array
    6868  {
    6969    return $this->GetList('/ip dhcp-server lease', array('address', 'active-address', 'comment', 'lease-time', 'status', 'host-name'));
  • trunk/Modules/NetworkConfigRouterOS/RouterboardAPI.php

    r874 r887  
    2525  }
    2626
    27   function EncodeLength($Length)
    28   {
    29     if ($Length < 0x80) {
     27  function EncodeLength(int $Length): int
     28  {
     29    if ($Length < 0x80)
     30    {
    3031      $Length = chr($Length);
    31     } else if ($Length < 0x4000) {
     32    } else if ($Length < 0x4000)
     33    {
    3234      $Length |= 0x8000;
    3335      $Length = chr(($Length >> 8) & 0xFF).chr($Length & 0xFF);
    34     } else if ($Length < 0x200000) {
     36    } else if ($Length < 0x200000)
     37    {
    3538      $Length |= 0xC00000;
    3639      $Length = chr(($Length >> 16) & 0xFF).chr(($Length >> 8) & 0xFF).chr($Length & 0xFF);
    37     } else if ($Length < 0x10000000) {
     40    } else if ($Length < 0x10000000)
     41    {
    3842      $Length |= 0xE0000000;
    3943      $Length = chr(($Length >> 24) & 0xFF).chr(($Length >> 16) & 0xFF).chr(($Length >> 8) & 0xFF).chr($Length & 0xFF);
     
    4347  }
    4448
    45   function ConnectOnce($IP, $Login, $Password)
     49  function ConnectOnce(string $IP, string $Login, string $Password): void
    4650  {
    4751    if ($this->Connected) $this->Disconnect();
     
    6367  }
    6468
    65   function Connect($IP, $Login, $Password)
     69  function Connect(string $IP, string $Login, string $Password): bool
    6670  {
    6771    for ($Attempt = 1; $Attempt <= $this->Attempts; $Attempt++)
     
    7478  }
    7579
    76   function Disconnect()
     80  function Disconnect(): void
    7781  {
    7882    if ($this->Connected)
     
    8387  }
    8488
    85   function ParseResponse($Response)
    86   {
    87     if (is_array($Response)) {
     89  function ParseResponse(array $Response): array
     90  {
     91    if (is_array($Response))
     92    {
    8893      $Parsed      = array();
    8994      $Current     = null;
    9095      $SingleValue = null;
    9196      $count       = 0;
    92       foreach ($Response as $x) {
     97      foreach ($Response as $x)
     98      {
    9399        if (in_array($x, array(
    94100            '!fatal',
    95101            '!re',
    96102            '!trap'
    97         ))) {
    98           if ($x == '!re') {
     103        )))
     104        {
     105          if ($x == '!re')
     106          {
    99107            $Current =& $Parsed[];
    100108          } else
    101109            $Current =& $Parsed[$x][];
    102         } else if ($x != '!done') {
    103           if (preg_match_all('/[^=]+/i', $x, $Matches)) {
     110        } else if ($x != '!done')
     111        {
     112          if (preg_match_all('/[^=]+/i', $x, $Matches))
     113          {
    104114            if ($Matches[0][0] == 'ret') {
    105115              $SingleValue = $Matches[0][1];
     
    109119        }
    110120      }
    111       if (empty($Parsed) && !is_null($SingleValue)) {
     121      if (empty($Parsed) && !is_null($SingleValue))
     122      {
    112123        $Parsed = $SingleValue;
    113124      }
     
    117128  }
    118129
    119   function ArrayChangeKeyName(&$array)
    120   {
    121     if (is_array($array)) {
    122       foreach ($array as $k => $v) {
     130  function ArrayChangeKeyName(array &$array): array
     131  {
     132    if (is_array($array))
     133    {
     134      foreach ($array as $k => $v)
     135      {
    123136        $tmp = str_replace("-", "_", $k);
    124137        $tmp = str_replace("/", "_", $tmp);
    125         if ($tmp) {
     138        if ($tmp)
     139        {
    126140          $array_new[$tmp] = $v;
    127         } else {
     141        } else
     142        {
    128143          $array_new[$k] = $v;
    129144        }
    130145      }
    131146      return $array_new;
    132     } else {
     147    } else
     148    {
    133149      return $array;
    134150    }
    135151  }
    136152
    137   function Read($Parse = true)
     153  function Read(bool $Parse = true): array
    138154  {
    139155    $Line = '';
    140156    $Response = array();
    141     while (true) {
     157    while (true)
     158    {
    142159      // Read the first byte of input which gives us some or all of the length
    143160      // of the remaining reply.
     
    149166      // If the fourth bit is set, we need to remove anything left in the first byte
    150167      // and then read in yet another byte.
    151       if ($Byte & 0x80) {
    152         if (($Byte & 0xc0) == 0x80) {
     168      if ($Byte & 0x80)
     169      {
     170        if (($Byte & 0xc0) == 0x80)
     171        {
    153172          $Length = (($Byte & 63) << 8) + ord(fread($this->Socket, 1));
    154         } else {
    155           if (($Byte & 0xe0) == 0xc0) {
     173        } else
     174        {
     175          if (($Byte & 0xe0) == 0xc0)
     176          {
    156177            $Length = (($Byte & 31) << 8) + ord(fread($this->Socket, 1));
    157178            $Length = ($Length << 8) + ord(fread($this->Socket, 1));
    158           } else {
    159             if (($Byte & 0xf0) == 0xe0) {
     179          } else
     180          {
     181            if (($Byte & 0xf0) == 0xe0)
     182            {
    160183              $Length = (($Byte & 15) << 8) + ord(fread($this->Socket, 1));
    161184              $Length = ($Length << 8) + ord(fread($this->Socket, 1));
    162185              $Length = ($Length << 8) + ord(fread($this->Socket, 1));
    163             } else {
     186            } else
     187            {
    164188              $Length = ord(fread($this->Socket, 1));
    165189              $Length = ($Length << 8) + ord(fread($this->Socket, 1));
     
    169193          }
    170194        }
    171       } else {
     195      } else
     196      {
    172197        $Length = $Byte;
    173198      }
    174199      // If we have got more characters to read, read them in.
    175       if ($Length > 0) {
     200      if ($Length > 0)
     201      {
    176202        $Line = '';
    177203        $RetLen = 0;
    178         while ($RetLen < $Length) {
     204        while ($RetLen < $Length)
     205        {
    179206          $ToRead = $Length - $RetLen;
    180207          $Line .= fread($this->Socket, $ToRead);
     
    196223  }
    197224
    198   function Write($Command, $Param2 = true)
     225  function Write(string $Command, bool $Param2 = true): bool
    199226  {
    200227    if ($Command)
    201228    {
    202229      $Data = explode("\n", $Command);
    203       foreach ($Data as $Com) {
     230      foreach ($Data as $Com)
     231      {
    204232        $Com = trim($Com);
    205233        fwrite($this->Socket, $this->EncodeLength(strlen($Com)).$Com);
    206234      }
    207       if (gettype($Param2) == 'integer') {
     235      if (gettype($Param2) == 'integer')
     236      {
    208237        fwrite($this->Socket, $this->EncodeLength(strlen('.tag='.$Param2)).'.tag='.$Param2.chr(0));
    209238      } else if (gettype($Param2) == 'boolean')
     
    214243  }
    215244
    216   function Comm($Com, $Arr = array())
     245  function Comm(string $Com, array $Arr = array()): array
    217246  {
    218247    $Count = count($Arr);
    219248    $this->write($Com, !$Arr);
    220249    $i = 0;
    221     foreach ($Arr as $k => $v) {
    222       switch ($k[0]) {
     250    foreach ($Arr as $k => $v)
     251    {
     252      switch ($k[0])
     253      {
    223254        case "?":
    224255          $el = "$k=$v";
Note: See TracChangeset for help on using the changeset viewer.