Ignore:
Timestamp:
Feb 22, 2015, 11:20:50 PM (9 years ago)
Author:
chronos
Message:
  • Modified: Tabs converted to spaces.
  • Modified: Remove spaces from end of lines.
  • Added: Code format script.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/Server/Server.php

    r766 r816  
    33class ModuleServer extends AppModule
    44{
    5         function __construct($System)
    6         {
    7                 parent::__construct($System);
    8                 $this->Name = 'Server';
    9                 $this->Version = '1.0';
    10                 $this->Creator = 'Chronos';
    11                 $this->License = 'GNU/GPL';
    12                 $this->Description = 'Show list of WoW servers which supports translated texts.';
    13                 $this->Dependencies = array();
    14         }
     5  function __construct($System)
     6  {
     7    parent::__construct($System);
     8    $this->Name = 'Server';
     9    $this->Version = '1.0';
     10    $this->Creator = 'Chronos';
     11    $this->License = 'GNU/GPL';
     12    $this->Description = 'Show list of WoW servers which supports translated texts.';
     13    $this->Dependencies = array();
     14  }
    1515
    16         function Start()
    17         {
    18                 $this->System->RegisterPage('server', 'PageServerList');
    19                 $this->System->RegisterMenuItem(array(
     16  function Start()
     17  {
     18    $this->System->RegisterPage('server', 'PageServerList');
     19    $this->System->RegisterMenuItem(array(
    2020      'Title' => T('Servers'),
    2121      'Hint' => 'Seznam serverů, kde je nasazena čeština v praxi',
     
    2424      'Icon' => '',
    2525    ), 5);
    26         }
     26  }
    2727}
    2828
    2929class PageServerList extends PageEdit
    3030{
    31         function __construct($System)
    32         {
    33                 parent::__construct($System);
    34           $this->Table = 'Server';
    35           $this->TableSQL = 'SELECT `Server`.`Id`, `Name`, `URL`, `Parts`, `XPRate`, `GameplayStyle`, `Description`, `CheckIP`, `CheckPort`, '.
     31  function __construct($System)
     32  {
     33    parent::__construct($System);
     34    $this->Table = 'Server';
     35    $this->TableSQL = 'SELECT `Server`.`Id`, `Name`, `URL`, `Parts`, `XPRate`, `GameplayStyle`, `Description`, `CheckIP`, `CheckPort`, '.
    3636      '`ClientVersion`.`Version` AS `ClientVersion` FROM `Server` '.
    3737      'LEFT JOIN `ClientVersion` ON `ClientVersion`.`Id` = `Server`.`ClientVersion`';
    38           $this->Definition = array(
    39             'Name' => array('Type' => 'String', 'Title' => T('Name'), 'InList' => true),
    40       'URL' => array('Type' => 'URL', 'Title' => T('URL'), 'InList' => true), 
    41       'Parts' => array('Type' => 'String', 'Title' => T('Translated'), 'InList' => true), 
     38    $this->Definition = array(
     39      'Name' => array('Type' => 'String', 'Title' => T('Name'), 'InList' => true),
     40      'URL' => array('Type' => 'URL', 'Title' => T('URL'), 'InList' => true),
     41      'Parts' => array('Type' => 'String', 'Title' => T('Translated'), 'InList' => true),
    4242      'XPRate' => array('Type' => 'String', 'Title' => T('XP rate'), 'InList' => true),
    4343      'GameplayStyle' => array('Type' => 'String', 'Title' => T('Style'), 'InList' => true),
    44       'ClientVersion' => array('Type' => 'String', 'Title' => T('Client version'), 'InList' => true),     
     44      'ClientVersion' => array('Type' => 'String', 'Title' => T('Client version'), 'InList' => true),
    4545      'Description' => array('Type' => 'Text', 'Title' => T('Description'), 'InList' => false),
    4646      'CheckIP' => array('Type' => 'Text', 'Title' => T('Online check IP'), 'InList' => false),
    4747      'CheckPort' => array('Type' => 'Text', 'Title' => T('Online check port'), 'InList' => false),
    48           );           
    49         }
    50        
    51         function ViewList()
    52         {
    53                 $this->Title = T('Servers');
     48    );
     49  }
     50
     51  function ViewList()
     52  {
     53    $this->Title = T('Servers');
    5454    $Output = '<p>'.T('There are servers listed which are in fact offering translated game. '.
    5555    'There is resoluted if translation is offered either on client side, on server side or both. '.
    5656    'Term "Czech server" doesn\'t mean that server is operated by Czech people but that it is possible to play in Czech.').'.</p>';
    5757    $Output .= '<h3>'.T('Translated server list').'</h3>';
    58                 $Output .= parent::ViewList();
    59                 return($Output);
    60         }
     58    $Output .= parent::ViewList();
     59    return($Output);
     60  }
    6161}
Note: See TracChangeset for help on using the changeset viewer.