Changeset 888 for trunk/Modules


Ignore:
Timestamp:
Dec 27, 2022, 7:50:23 PM (2 years ago)
Author:
chronos
Message:
  • Modified: Updated Common package to latest version.
  • Modified: Fixes related to PHP 8.x.
Location:
trunk/Modules
Files:
37 edited

Legend:

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

    r884 r888  
    11<?php
    22
    3 class ModuleAdmin extends AppModule
     3class ModuleAdmin extends Module
    44{
    55  function __construct(System $System)
     
    1414  }
    1515
    16   function DoStart()
    17   {
    18     $this->System->RegisterMenuItem(array(
     16  function DoStart(): void
     17  {
     18    Core::Cast($this->System)->RegisterMenuItem(array(
    1919      'Title' => T('Administration'),
    2020      'Hint' => T('Administration tools'),
     
    2323      'Icon' => '',
    2424    ));
    25     $this->System->RegisterPage('admin', 'PageAdmin');
     25    $this->System->RegisterPage(['admin'], 'PageAdmin');
    2626  }
    2727}
     
    305305  }
    306306
    307   function Show()
     307  function Show(): string
    308308  {
    309309    $this->Title = T('Administration');
  • trunk/Modules/AoWoW/AoWoW.php

    r880 r888  
    11<?php
    22
    3 class ModuleAoWoW extends AppModule
     3class ModuleAoWoW extends Module
    44{
    55  function __construct(System $System)
     
    1414  }
    1515
    16   function DoStart()
     16  function DoStart(): void
    1717  {
    18     $this->System->RegisterMenuItem(array(
     18    Core::Cast($this->System)->RegisterMenuItem(array(
    1919      'Title' => 'AoWoW',
    2020      'Hint' => 'Vyhledávací databáze podobná WoWHead s překlady',
  • trunk/Modules/ClientVersion/ClientVersion.php

    r880 r888  
    11<?php
    22
    3 class ModuleClientVersion extends AppModule
     3class ModuleClientVersion extends Module
    44{
    55  function __construct(System $System)
     
    1414  }
    1515
    16   function DoStart()
     16  function DoStart(): void
    1717  {
    18     $this->System->RegisterPage('client-version', 'PageClientVersion');
    19     $this->System->RegisterMenuItem(array(
     18    $this->System->RegisterPage(['client-version'], 'PageClientVersion');
     19    Core::Cast($this->System)->RegisterMenuItem(array(
    2020      'Title' => T('Game version'),
    2121      'Hint' => T('List of the game client versions'),
     
    2929class PageClientVersion extends Page
    3030{
    31   function Show()
     31  function Show(): string
    3232  {
    3333    if (array_key_exists('action', $_GET))
  • trunk/Modules/Dictionary/Dictionary.php

    r880 r888  
    11<?php
    22
    3 class ModuleDictionary extends AppModule
     3class ModuleDictionary extends Module
    44{
    55  function __construct(System $System)
     
    1414  }
    1515
    16   function DoStart()
    17   {
    18     $this->System->RegisterPage('dictionary', 'PageDictionary');
    19     $this->System->RegisterMenuItem(array(
     16  function DoStart(): void
     17  {
     18    $this->System->RegisterPage(['dictionary'], 'PageDictionary');
     19    Core::Cast($this->System)->RegisterMenuItem(array(
    2020      'Name' => 'Dictionary',
    2121      'Title' => T('Dictionary'),
     
    311311  }
    312312
    313   function Show()
     313  function Show(): string
    314314  {
    315315    global $LanguageList;
  • trunk/Modules/Download/Download.php

    r880 r888  
    11<?php
    22
    3 class ModuleDownload extends AppModule
     3class ModuleDownload extends Module
    44{
    55  function __construct(System $System)
     
    1414  }
    1515
    16   function DoStart()
     16  function DoStart(): void
    1717  {
    18     $this->System->RegisterPage('download', 'PageDownload');
    19     $this->System->RegisterMenuItem(array(
     18    $this->System->RegisterPage(['download'], 'PageDownload');
     19    Core::Cast($this->System)->RegisterMenuItem(array(
    2020      'Title' => T('Download'),
    2121      'Hint' => T('List of files for download'),
     
    147147  }
    148148
    149   function Show()
     149  function Show(): string
    150150  {
    151151    $this->Title = T('Download');
  • trunk/Modules/Error/Error.php

    r880 r888  
    11<?php
    22
    3 class ModuleError extends AppModule
     3class ModuleError extends Module
    44{
    55  var $OnError;
     
    2121  }
    2222
    23   function DoStart()
     23  function DoStart(): void
    2424  {
    2525    if (isset($this->System->Config['Web']['ShowPHPError']))
     
    2929  }
    3030
    31   function DoStop()
     31  function DoStop(): void
    3232  {
    3333    $this->ErrorHandler->Stop();
  • trunk/Modules/Export/CreateAddon.php

    r880 r888  
    267267    $Buffer = '
    268268 Čeština pro klienty:
    269   Vytvořeno v projektu http://wowpreklad.zdechov.net/
     269  Vytvořeno v projektu https://wowpreklad.zdechov.net/
    270270  Obsahuje Fonty pro správné zobrazování českých znaků, WoW addon překládající
    271271texty
  • trunk/Modules/Export/Export.php

    r882 r888  
    11<?php
     2
     3class ModuleExport extends Module
     4{
     5  function __construct(System $System)
     6  {
     7    parent::__construct($System);
     8    $this->Name = 'Export';
     9    $this->Version = '1.0';
     10    $this->Creator = 'Chronos';
     11    $this->License = 'GNU/GPL';
     12    $this->Description = 'Allow parametric export of translated texts to various supported output formats';
     13    $this->Dependencies = array('Translation');
     14  }
     15
     16  function DoStart(): void
     17  {
     18    $this->System->RegisterPage(['export'], 'PageExport');
     19    $this->System->RegisterPage(['export', 'progress'], 'PageExportProgress');
     20    Core::Cast($this->System)->RegisterMenuItem(array(
     21      'Title' => 'Exporty',
     22      'Hint' => 'Zde si můžete stáhnout přeložené texty',
     23      'Link' => $this->System->Link('/export/'),
     24      'Permission' => LICENCE_ANONYMOUS,
     25      'Icon' => '',
     26    ), 2);
     27  }
     28
     29  function GetTaskProgress($TaskId)
     30  {
     31    $Output = '';
     32    $DbResult = $this->Database->query('SELECT * FROM `ExportTask` '.
     33      'LEFT JOIN `Export` ON `Export`.`Id` = `ExportTask`.`Export` WHERE '.
     34      '((`Export`.`OutputType` = 9) OR (`Export`.`OutputType` = 10)) AND '.
     35      '(`TimeFinish` IS NULL) OR (`Export` ='.$TaskId.') ORDER BY `TimeQueued`'); // `Export`='.$Export->Id
     36    while ($Task = $DbResult->fetch_assoc())
     37    {
     38      $Export = '<a href="'.$this->System->Link('/export/?Action=View&amp;ExportId='.$Task['Export']).'">'.$Task['Export'].'</a>';
     39      if ($TaskId == $Task['Export'])
     40        $Export = ''.$Export.' (tento)';
     41
     42      // Show progress bar
     43      $Output .= ' <strong>Export '.$Export.':</strong> <div id="progress'.$Task['Export'].'">'.
     44        '<strong>'.ProgressBar(300, $Task['Progress']).'</strong> ';
     45
     46      // Show estimated time to complete
     47      $PrefixMultiplier = new PrefixMultiplier();
     48      if ($Task['Progress'] > 0) {
     49        $ElapsedTime = time() - MysqlDateTimeToTime($Task['TimeStart']);
     50        $Output .= T('Elapsed time').': <strong>'.$PrefixMultiplier->Add($ElapsedTime, '', 4, 'Time').'</strong> / ';
     51        $EstimatedTime = (time() - MysqlDateTimeToTime($Task['TimeStart'])) / $Task['Progress'] * (100 - $Task['Progress']);
     52        $Output .= T('Estimated remaining time').': <strong>'.$PrefixMultiplier->Add($EstimatedTime, '', 4, 'Time').'</strong><br/>';
     53      }
     54      $Output .= '</div>';
     55
     56      if ($Task['Progress'] > 99)
     57        $Output .= '<script type="text/javascript" language="JavaScript" charset="utf-8">'.
     58        'setTimeout("parent.location.href=\''.$this->System->Link('/export/?Action=View&Tab=7&ExportId='.$TaskId).'\'", 500)'.
     59        '</script>';
     60    }
     61    return $Output;
     62  }
     63}
    264
    365class Export extends Model
     
    601663'<table cellspacing="10"><tr><td valign="top">'.
    602664
    603 '<p>Texty přebírány z projektu <a href="http://wowpreklad.zdechov.net/">wowpreklad.zdechov.net</a><br>'.
    604 '<a href="http://wowpreklad.zdechov.net/export/?Action=View&ExportId='.$this->Id.'&Tab=0">Export '.$this->Id.'</a></p><br>'.
     665'<p>Texty přebírány z projektu <a href="https://wowpreklad.zdechov.net/">wowpreklad.zdechov.net</a><br>'.
     666'<a href="http://wowpreklad.zdechov.nets/export/?Action=View&ExportId='.$this->Id.'&Tab=0">Export '.$this->Id.'</a></p><br>'.
    605667
    606668
     
    609671'<li>Požadovaná verze klienta: '.$this->ClientVersion['Version'].'</li>'.
    610672'<li>Datum uvolnění: '.date('d.m.Y h:m',time()).'</li>'.
    611 '<li>Sestaveno automaticky překladovým systémem <a href="http://wowpreklad.zdechov.net/">WoW překlad</a></li>'.
     673'<li>Sestaveno automaticky překladovým systémem <a href="https://wowpreklad.zdechov.net/">WoW překlad</a></li>'.
    612674//'<li>Tento soubor se generuje každý den. Pokud se zapojíte do překladu, zítra můžete stáhnout tento soubor znovu včetně svých překladů</li>'.
    613675//'<li>Sestavil: Maron</li>'.
     
    716778include_once(dirname(__FILE__).'/ExportOutput.php');
    717779
    718 class ModuleExport extends AppModule
    719 {
    720   function __construct(System $System)
    721   {
    722     parent::__construct($System);
    723     $this->Name = 'Export';
    724     $this->Version = '1.0';
    725     $this->Creator = 'Chronos';
    726     $this->License = 'GNU/GPL';
    727     $this->Description = 'Allow parametric export of translated texts to various supported output formats';
    728     $this->Dependencies = array('Translation');
    729   }
    730 
    731   function DoStart()
    732   {
    733     $this->System->RegisterPage('export', 'PageExport');
    734     $this->System->RegisterPage(array('export', 'progress'), 'PageExportProgress');
    735     $this->System->RegisterMenuItem(array(
    736       'Title' => 'Exporty',
    737       'Hint' => 'Zde si můžete stáhnout přeložené texty',
    738       'Link' => $this->System->Link('/export/'),
    739       'Permission' => LICENCE_ANONYMOUS,
    740       'Icon' => '',
    741     ), 2);
    742   }
    743 
    744   function GetTaskProgress($TaskId)
    745   {
    746     $Output = '';
    747     $DbResult = $this->Database->query('SELECT * FROM `ExportTask` '.
    748       'LEFT JOIN `Export` ON `Export`.`Id` = `ExportTask`.`Export` WHERE '.
    749       '((`Export`.`OutputType` = 9) OR (`Export`.`OutputType` = 10)) AND '.
    750       '(`TimeFinish` IS NULL) OR (`Export` ='.$TaskId.') ORDER BY `TimeQueued`'); // `Export`='.$Export->Id
    751     while ($Task = $DbResult->fetch_assoc())
    752     {
    753       $Export = '<a href="'.$this->System->Link('/export/?Action=View&amp;ExportId='.$Task['Export']).'">'.$Task['Export'].'</a>';
    754       if ($TaskId == $Task['Export'])
    755         $Export = ''.$Export.' (tento)';
    756 
    757       // Show progress bar
    758       $Output .= ' <strong>Export '.$Export.':</strong> <div id="progress'.$Task['Export'].'">'.
    759         '<strong>'.ProgressBar(300, $Task['Progress']).'</strong> ';
    760 
    761       // Show estimated time to complete
    762       $PrefixMultiplier = new PrefixMultiplier();
    763       if ($Task['Progress'] > 0) {
    764         $ElapsedTime = time() - MysqlDateTimeToTime($Task['TimeStart']);
    765         $Output .= T('Elapsed time').': <strong>'.$PrefixMultiplier->Add($ElapsedTime, '', 4, 'Time').'</strong> / ';
    766         $EstimatedTime = (time() - MysqlDateTimeToTime($Task['TimeStart'])) / $Task['Progress'] * (100 - $Task['Progress']);
    767         $Output .= T('Estimated remaining time').': <strong>'.$PrefixMultiplier->Add($EstimatedTime, '', 4, 'Time').'</strong><br/>';
    768       }
    769       $Output .= '</div>';
    770 
    771       if ($Task['Progress'] > 99)
    772         $Output .= '<script type="text/javascript" language="JavaScript" charset="utf-8">'.
    773         'setTimeout("parent.location.href=\''.$this->System->Link('/export/?Action=View&Tab=7&ExportId='.$TaskId).'\'", 500)'.
    774         '</script>';
    775     }
    776     return $Output;
    777   }
    778 }
  • trunk/Modules/Export/Page.php

    r880 r888  
    813813  }
    814814
    815   function Show()
     815  function Show(): string
    816816  {
    817817    $this->Title = T('Export');
     
    837837  }
    838838
    839   function Show()
     839  function Show(): string
    840840  {
    841841    if (array_key_exists('i', $_GET))
  • trunk/Modules/Export/cmdmpqexport.php

    r880 r888  
    138138'<table cellspacing="10"><tr><td valign="top">'.
    139139
    140 '<p>Texty přebírány z projektu <a href="http://wowpreklad.zdechov.net/">wowpreklad.zdechov.net</a><br>'.
    141 '<a href="http://wowpreklad.zdechov.net/export/?Action=View&ExportId='.$_GET['ExportId'].'&Tab=0">Export '.$_GET['ExportId'].'</a></p><br>'.
     140'<p>Texty přebírány z projektu <a href="https://wowpreklad.zdechov.net/">wowpreklad.zdechov.net</a><br>'.
     141'<a href="https://wowpreklad.zdechov.net/export/?Action=View&ExportId='.$_GET['ExportId'].'&Tab=0">Export '.$_GET['ExportId'].'</a></p><br>'.
    142142
    143143
     
    146146'<li>Požadovaná verze klienta: '.$Export->ClientVersion['Version'].'</li>'.
    147147'<li>Datum uvolnění: '.date('d.m.Y h:m',time()).'</li>'.
    148 '<li>Sestaveno automaticky překladovým systémem <a href="http://wowpreklad.zdechov.net/">WoW překlad</a></li>'.
     148'<li>Sestaveno automaticky překladovým systémem <a href="https://wowpreklad.zdechov.net/">WoW překlad</a></li>'.
    149149//'<li>Tento soubor se generuje každý den. Pokud se zapojíte do překladu, zítra můžete stáhnout tento soubor znovu včetně svých překladů</li>'.
    150150//'<li>Sestavil: Maron</li>'.
  • trunk/Modules/Forum/Forum.php

    r880 r888  
    11<?php
    22
    3 class ModuleForum extends AppModule
     3class ModuleForum extends Module
    44{
    55  function __construct(System $System)
     
    1414  }
    1515
    16   function DoStart()
    17   {
    18     $this->System->RegisterPage('forum', 'PageForum');
     16  function DoStart(): void
     17  {
     18    $this->System->RegisterPage(['forum'], 'PageForum');
    1919    $this->System->ModuleManager->Modules['News']->RegisterRSS(array(
    2020      'Title' => T('Forum'), 'Channel' => 'forum', 'Callback' => array('PageForum', 'ShowRSS'),
     
    2929      $this->System->Link('/forum/?search='));
    3030
    31     $this->System->RegisterMenuItem(array(
     31    Core::Cast($this->System)->RegisterMenuItem(array(
    3232      'Title' => T('Forum'),
    3333      'Hint' => T('Forum about translation wow'),
     
    6868class PageForum extends Page
    6969{
    70   function Show()
     70  function Show(): string
    7171  {
    7272    $Output = '';
     
    181181    $Output = '';
    182182
    183     $parser = new HTML_BBCodeParser2(array('filters' => array('Basic','Extended','Images','Links','Lists','Email')));
     183    $Parser = new HTML_BBCodeParser2(array('filters' => array('Basic', 'Extended', 'Images', 'Links', 'Lists', 'Email')));
    184184
    185185    if (array_key_exists('search', $_GET)) $_SESSION['search'] = $_GET['search'];
     
    205205    $Output .= '<div class="shoutbox">';
    206206    $DbResult = $this->System->Database->query('SELECT * FROM `ForumText` WHERE `Thread` = '.
    207       ($_GET['Thread']*1).' '.$SearchQuery.' ORDER BY `ID` DESC '.$PageList['SQLLimit']);
    208     while ($Line = $DbResult->fetch_assoc()) {
     207      ($_GET['Thread'] * 1).' '.$SearchQuery.' ORDER BY `ID` DESC '.$PageList['SQLLimit']);
     208    while ($Line = $DbResult->fetch_assoc())
     209    {
    209210      if ($this->System->User->Id == $Line['User'])
     211      {
    210212        $edit = '<a href="?Edit='.$Line['ID'].'">'.T('edit').'</a>';
    211       else $edit = '';
     213      } else $edit = '';
     214      $Text = str_replace("\n", '<br />', $Parser->qparse(htmlspecialchars($Line['Text'])));
    212215      $Output .= '<div><span style="float:right;">'.$edit.' ('.HumanDate($Line['Date']).
    213         ')</span><strong>'.$Line['UserName'].'</strong>: '.str_replace("\n", '<br />',
    214         $parser->qparse(htmlspecialchars($Line['Text']))).'  </div> ';
     216        ')</span><strong>'.$Line['UserName'].'</strong>: '.$Text.'  </div> ';
    215217    }
    216218    $Output .= '</div>'.$PageList['Output'];
     
    243245    if ($this->System->User->Licence(LICENCE_USER))
    244246    {
    245         $Output .= '<form action="?" method="post">'.
    246             '<fieldset><legend>'.T('New thread').'</legend>'.
    247             T('User').': ';
    248         if ($this->System->User->Licence(LICENCE_USER)) $Output .= '<b>'.$this->System->User->Name.'</b><br />';
     247      $Output .= '<form action="?" method="post">'.
     248        '<fieldset><legend>'.T('New thread').'</legend>'.T('User').': ';
     249      if ($this->System->User->Licence(LICENCE_USER)) $Output .= '<b>'.$this->System->User->Name.'</b><br />';
    249250        else $Output .= '<input type="text" name="user" /><br />';
    250251      $Output .= T('Name of thread').': <br />'.
  • trunk/Modules/FrontPage/FrontPage.php

    r880 r888  
    11<?php
    22
    3 class ModuleFrontPage extends AppModule
     3class ModuleFrontPage extends Module
    44{
    55  function __construct(System $System)
     
    1515  }
    1616
    17   function DoStart()
     17  function DoStart(): void
    1818  {
    19     $this->System->RegisterPage('', 'PageFrontPage');
    20     $this->System->RegisterMenuItem(array(
     19    $this->System->RegisterPage([''], 'PageFrontPage');
     20    Core::Cast($this->System)->RegisterMenuItem(array(
    2121      'Title' => T('Home'),
    2222      'Hint' => T('Main page'),
     
    7171class PageFrontPage extends Page
    7272{
    73   function Show()
     73  function Show(): string
    7474  {
    7575    global $Message, $MessageType;
  • trunk/Modules/Import/Import.php

    r880 r888  
    55
    66
    7 class ModuleImport extends AppModule
     7class ModuleImport extends Module
    88{
    99  function __construct(System $System)
     
    1818  }
    1919
    20   function DoStart()
    21   {
    22     $this->System->RegisterPage('import', 'PageImport');
     20  function DoStart(): void
     21  {
     22    $this->System->RegisterPage(['import'], 'PageImport');
    2323  }
    2424}
  • trunk/Modules/Import/Manage.php

    r880 r888  
    9696  }
    9797
    98   function Show()
     98  function Show(): string
    9999  {
    100100    $this->Title = T('Import');
  • trunk/Modules/Info/Info.php

    r880 r888  
    11<?php
    22
    3 class ModuleInfo extends AppModule
     3class ModuleInfo extends Module
    44{
    55  function __construct(System $System)
     
    1414  }
    1515
    16   function DoStart()
     16  function DoStart(): void
    1717  {
    18     $this->System->RegisterMenuItem(array(
     18    Core::Cast($this->System)->RegisterMenuItem(array(
    1919      'Title' => T('Instructions'),
    2020      'Hint' => 'Informace k překladu hry',
     
    2323      'Icon' => '',
    2424    ));
    25     $this->System->RegisterPage('info', 'PageInfo');
    26     $this->System->RegisterMenuItem(array(
     25    $this->System->RegisterPage(['info'], 'PageInfo');
     26    Core::Cast($this->System)->RegisterMenuItem(array(
    2727      'Title' => T('Presentation'),
    2828      'Hint' => 'Prezentace a motivace překladu',
     
    3131      'Icon' => '',
    3232    ));
    33     $this->System->RegisterPage('promotion', 'PagePromotion');
     33    $this->System->RegisterPage(['promotion'], 'PagePromotion');
    3434  }
    3535}
     
    3737class PageInfo extends Page
    3838{
    39   function Show()
     39  function Show(): string
    4040  {
    4141    $this->Title = T('Information for translators');
     
    7575class PagePromotion extends Page
    7676{
    77   function Show()
     77  function Show(): string
    7878  {
    7979    $this->Title = T('Promotion');
  • trunk/Modules/Log/Log.php

    r884 r888  
    11<?php
    22
    3 class ModuleLog extends AppModule
     3class ModuleLog extends Module
    44{
    55  var $Excludes;
     
    1818  }
    1919
    20   function DoStart()
    21   {
    22     $this->System->RegisterPage('log', 'PageLog');
     20  function DoStart(): void
     21  {
     22    $this->System->RegisterPage(['log'], 'PageLog');
    2323    $this->System->ModuleManager->Modules['Error']->OnError[] = array($this, 'DoAddItem');
    2424    $this->System->ModuleManager->Modules['News']->RegisterRSS(array('Title' => T('Logs'),
     
    109109  }
    110110
    111   function Show()
     111  function Show(): string
    112112  {
    113113    if (array_key_exists('a', $_POST)) $Action = $_POST['a'];
  • trunk/Modules/News/News.php

    r880 r888  
    33include_once(dirname(__FILE__).'/RSS.php');
    44
    5 class ModuleNews extends AppModule
     5class ModuleNews extends Module
    66{
    77  var $RSSChannels;
     
    1919  }
    2020
    21   function DoStart()
     21  function DoStart(): void
    2222  {
    23     $this->System->RegisterPage('news', 'PageNews');
    24     $this->System->RegisterPage('rss', 'PageRSS');
     23    $this->System->RegisterPage(['news'], 'PageNews');
     24    $this->System->RegisterPage(['rss'], 'PageRSS');
    2525    $this->RegisterRSS(array('Title' => T('News'), 'Channel' => 'news',
    2626      'Callback' => array('PageNews', 'ShowRSS'), 'Permission' => LICENCE_ANONYMOUS));
    27     $this->System->RegisterPageHeader('New', array($this, 'ShowRSSHeader'));
     27      Core::Cast($this->System)->RegisterPageHeader('New', array($this, 'ShowRSSHeader'));
    2828  }
    2929
     
    6969class PageNews extends Page
    7070{
    71   function Show()
     71  function Show(): string
    7272  {
    7373    $this->Title = T('News');
  • trunk/Modules/News/RSS.php

    r880 r888  
    3131class PageRSS extends Page
    3232{
    33   function Show()
     33  function Show(): string
    3434  {
    3535    $this->RawPage = true;
  • trunk/Modules/Redirection/Redirection.php

    r880 r888  
    11<?php
    22
    3 class ModuleRedirection extends AppModule
     3class ModuleRedirection extends Module
    44{
    55  function __construct(System $System)
     
    1515  }
    1616
    17   function DoStart()
     17  function DoStart(): void
    1818  {
    1919    $this->System->OnPageNotFound = array($this, 'ShowRedirect');
  • trunk/Modules/Referrer/Referrer.php

    r880 r888  
    11<?php
    22
    3 class ModuleReferrer extends AppModule
     3class ModuleReferrer extends Module
    44{
    55  var $Excludes;
     
    1818  }
    1919
    20   function DoStart()
     20  function DoStart(): void
    2121  {
    2222    $this->Excludes[] = $this->System->Config['Web']['Host'];
    2323    $this->Log();
    24     $this->System->RegisterPage('referrer', 'PageReferrer');
    25     $this->System->RegisterMenuItem(array(
     24    $this->System->RegisterPage(['referrer'], 'PageReferrer');
     25    Core::Cast($this->System)->RegisterMenuItem(array(
    2626      'Title' => T('Promotion'),
    2727      'Hint' => 'Informace k propagaci tohoto projektu',
     
    246246  }
    247247
    248   function Show()
     248  function Show(): string
    249249  {
    250250    $this->Title = T('Promotion');
  • trunk/Modules/Search/Search.php

    r880 r888  
    11<?php
    22
    3 class ModuleSearch extends AppModule
     3class ModuleSearch extends Module
    44{
    55  var $SearchItems;
     
    1717  }
    1818
    19   function DoStart()
     19  function DoStart(): void
    2020  {
    21     $this->System->RegisterPage('search', 'PageSearch');
    22     $this->System->RegisterPageBarItem('Left', 'Search', array($this, 'ShowSearchBox'));
     21    $this->System->RegisterPage(['search'], 'PageSearch');
     22    Core::Cast($this->System)->RegisterPageBarItem('Left', 'Search', array($this, 'ShowSearchBox'));
    2323  }
    2424
     
    5454class PageSearch extends Page
    5555{
    56   function Show()
     56  function Show(): string
    5757  {
    5858    $this->Title = T('Search');
  • trunk/Modules/Server/Server.php

    r880 r888  
    11<?php
    22
    3 class ModuleServer extends AppModule
     3class ModuleServer extends Module
    44{
    55  function __construct(System $System)
     
    1414  }
    1515
    16   function DoStart()
     16  function DoStart(): void
    1717  {
    18     $this->System->RegisterPage('server', 'PageServerList');
    19     $this->System->RegisterMenuItem(array(
     18    $this->System->RegisterPage(['server'], 'PageServerList');
     19    Core::Cast($this->System)->RegisterMenuItem(array(
    2020      'Title' => T('Servers'),
    2121      'Hint' => 'Seznam serverů, kde je nasazena čeština v praxi',
  • trunk/Modules/ShoutBox/ShoutBox.php

    r880 r888  
    11<?php
    22
    3 class ModuleShoutBox extends AppModule
     3class ModuleShoutBox extends Module
    44{
    55  function __construct(System $System)
     
    1414  }
    1515
    16   function DoStart()
     16  function DoStart(): void
    1717  {
    18     $this->System->RegisterPage('shoutbox', 'PageShoutBox');
     18    $this->System->RegisterPage(['shoutbox'], 'PageShoutBox');
    1919    $this->System->ModuleManager->Modules['News']->RegisterRSS(array(
    2020      'Title' => T('Shoutbox'), 'Channel' => 'shoutbox', 'Callback' => array('PageShoutBox', 'ShowRSS'),
     
    4242class PageShoutBox extends Page
    4343{
    44   function Show()
     44  function Show(): string
    4545  {
    4646    $this->Title = T('Shoutbox');
  • trunk/Modules/Team/Team.php

    r880 r888  
    11<?php
    22
    3 class ModuleTeam extends AppModule
     3class ModuleTeam extends Module
    44{
    55  function __construct(System $System)
     
    1414  }
    1515
    16   function DoStart()
    17   {
    18     $this->System->RegisterPage('team', 'PageTeam');
    19     $this->System->RegisterMenuItem(array(
     16  function DoStart(): void
     17  {
     18    $this->System->RegisterPage(['team'], 'PageTeam');
     19    Core::Cast($this->System)->RegisterMenuItem(array(
    2020      'Title' => T('Teams'),
    2121      'Hint' => T('List of translating teams'),
     
    162162            '<tr><td colspan="2"><input type="submit" value="'.T('Save').'" /></td></tr>'.
    163163            '</table></fieldset></form>';
    164         } else $Output = ShowMesage('Tým nenalezen.', MESSAGE_CRITICAL);
     164        } else $Output = ShowMessage('Tým nenalezen.', MESSAGE_CRITICAL);
    165165      } else $Output = ShowMessage('Nezadáno id týmu', MESSAGE_CRITICAL);
    166166    } else $Output = ShowMessage(T('Access denied'), MESSAGE_CRITICAL);
     
    328328  }
    329329
    330   function Show()
     330  function Show(): string
    331331  {
    332332    if (array_key_exists('action', $_GET))
  • trunk/Modules/Translation/Comparison.php

    r880 r888  
    3838  }
    3939
    40   function Show()
     40  function Show(): string
    4141  {
    4242    $TranslationTree = $this->System->ModuleManager->Modules['Translation']->GetTranslationTree();
  • trunk/Modules/Translation/Form.php

    r880 r888  
    66  var $ID;
    77
    8   function Show()
     8  function Show(): string
    99  {
    1010    $this->Title = T('Translation');
     
    1717  }
    1818
    19   function ShowForm()
     19  function ShowForm(): string
    2020  {
    2121    $TranslationTree = $this->System->ModuleManager->Modules['Translation']->GetTranslationTree();
  • trunk/Modules/Translation/LoadNames.php

    r880 r888  
    9090    }
    9191
    92   function Show()
     92  function Show(): string
    9393  {
    9494    $this->RawPage = true;
  • trunk/Modules/Translation/Progress.php

    r880 r888  
    6464  }
    6565
    66   function Show()
     66  function Show(): string
    6767  {
    6868    $this->Title = T('Progress');
  • trunk/Modules/Translation/Save.php

    r880 r888  
    174174  }
    175175
    176   function Show()
     176  function Show(): string
    177177  {
    178178    global $Message, $MessageType;
  • trunk/Modules/Translation/Translation.php

    r880 r888  
    99include_once(dirname(__FILE__).'/UserLevel.php');
    1010
    11 class ModuleTranslation extends AppModule
     11class ModuleTranslation extends Module
    1212{
    1313  function __construct(System $System)
     
    2222  }
    2323
    24   function DoStart()
    25   {
    26     $this->System->RegisterPage('comparison.php', 'PageTranslationComparison');
    27     $this->System->RegisterPage('form.php', 'PageTranslationForm');
    28     $this->System->RegisterPage('save.php', 'PageTranslationSave');
    29     $this->System->RegisterPage('progress', 'PageProgress');
    30     $this->System->RegisterPage('translation-groups', 'PageTranslationGroups');
    31     $this->System->RegisterPage('TranslationList.php', 'PageTranslationList');
    32     $this->System->RegisterPage('LoadNames.php', 'PageLoadNames');
     24  function DoStart(): void
     25  {
     26    $this->System->RegisterPage(['comparison.php'], 'PageTranslationComparison');
     27    $this->System->RegisterPage(['form.php'], 'PageTranslationForm');
     28    $this->System->RegisterPage(['save.php'], 'PageTranslationSave');
     29    $this->System->RegisterPage(['progress'], 'PageProgress');
     30    $this->System->RegisterPage(['translation-groups'], 'PageTranslationGroups');
     31    $this->System->RegisterPage(['TranslationList.php'], 'PageTranslationList');
     32    $this->System->RegisterPage(['LoadNames.php'], 'PageLoadNames');
    3333    $this->System->ModuleManager->Modules['News']->RegisterRSS(array('Title' => T('Last translations'),
    3434      'Channel' => 'translation', 'Callback' => array($this, 'ShowRSS'), 'Permission' => LICENCE_ANONYMOUS));
    35     $this->System->RegisterMenuItem(array(
     35    Core::Cast($this->System)->RegisterMenuItem(array(
    3636      'Title' => T('Completion status'),
    3737      'Hint' => 'Stav dokončení překládů',
     
    4040      'Icon' => '',
    4141    ), 1);
    42     $this->System->RegisterMenuItem(array(
     42    Core::Cast($this->System)->RegisterMenuItem(array(
    4343      'Title' => T('Data source'),
    4444      'Hint' => 'Informace o překladových skupinách',
     
    6666      }
    6767    }
    68     $this->System->RegisterPageBarItem('Right', 'TranslatedMenu', array($this, 'ShowTranslatedMenu'));
     68    Core::Cast($this->System)->RegisterPageBarItem('Right', 'TranslatedMenu', array($this, 'ShowTranslatedMenu'));
    6969  }
    7070
  • trunk/Modules/Translation/TranslationList.php

    r880 r888  
    376376  }
    377377
    378   function Show()
     378  function Show(): string
    379379  {
    380380    $this->Title = T('Translation groups');
     
    521521  }
    522522
    523   function Show()
     523  function Show(): string
    524524  {
    525525    $this->Title = T('Translation groups');
  • trunk/Modules/User/Options.php

    r884 r888  
    134134  }
    135135
    136   function Show()
     136  function Show(): string
    137137  {
    138138    $this->Title = T('User settings');
  • trunk/Modules/User/Profile.php

    r880 r888  
    246246  }
    247247
    248   function Show()
     248  function Show(): string
    249249  {
    250250    $this->Title = T('User profile');
  • trunk/Modules/User/Registration.php

    r884 r888  
    159159  }
    160160
    161   function Show()
     161  function Show(): string
    162162  {
    163163    $this->Title = T('User registration');
  • trunk/Modules/User/User.php

    r884 r888  
    66include_once(dirname(__FILE__).'/Profile.php');
    77
    8 class ModuleUser extends AppModule
     8class ModuleUser extends Module
    99{
    1010  function __construct(System $System)
     
    1919  }
    2020
    21   function DoStart()
     21  function DoStart(): void
    2222  {
    2323    $this->System->User = new User($this->System);
    24     $this->System->RegisterPage('users', 'PageUserList');
    25     $this->System->RegisterPage('options', 'PageUserOptions');
    26     $this->System->RegisterPage('registration', 'PageUserRegistration');
    27     $this->System->RegisterPage('user', 'PageUserProfile');
    28     $this->System->RegisterPage('login', 'PageUserLogin');
    29     $this->System->RegisterMenuItem(array(
     24    $this->System->RegisterPage(['users'], 'PageUserList');
     25    $this->System->RegisterPage(['options'], 'PageUserOptions');
     26    $this->System->RegisterPage(['registration'], 'PageUserRegistration');
     27    $this->System->RegisterPage(['user'], 'PageUserProfile');
     28    $this->System->RegisterPage(['login'], 'PageUserLogin');
     29    Core::Cast($this->System)->RegisterMenuItem(array(
    3030      'Title' => T('Translators'),
    3131      'Hint' => 'Seznam registrovaných uživatelů',
     
    3737      $this->System->ModuleManager->Modules['Search']->RegisterSearch('user',
    3838      T('Translators'), array('Name'), '`User`', $this->System->Link('/users/?search='));
    39     $this->System->RegisterPageBarItem('Top', 'User', array($this, 'TopBarCallback'));
    40     $this->System->RegisterPageBarItem('Left', 'User', array($this, 'ShowOnlineList'));
     39      Core::Cast($this->System)->RegisterPageBarItem('Top', 'User', array($this, 'TopBarCallback'));
     40      Core::Cast($this->System)->RegisterPageBarItem('Left', 'User', array($this, 'ShowOnlineList'));
    4141  }
    4242
     
    8585class PageUserLogin extends Page
    8686{
    87   function Show()
     87  function Show(): string
    8888  {
    8989    $Output = '<form action="'.$this->System->Link('/?action=login').'" method="post" class="Form">'.
  • trunk/Modules/User/UserList.php

    r880 r888  
    33class PageUserList extends Page
    44{
    5   function Show()
     5  function Show(): string
    66  {
    77    $this->Title = T('Translators');
  • trunk/Modules/Wiki/Wiki.php

    r880 r888  
    11<?php
    22
    3 class ModuleWiki extends AppModule
     3class ModuleWiki extends Module
    44{
    55  function __construct(System $System)
     
    1414  }
    1515
    16   function DoStart()
     16  function DoStart(): void
    1717  {
    1818    $this->LoadPages();
     
    2525    {
    2626      $this->System->RegisterPage($DbRow['NormalizedName'], 'PageWiki');
    27       $this->System->RegisterMenuItem(array(
     27      Core::Cast($this->System)->RegisterMenuItem(array(
    2828          'Title' => $DbRow['Name'],
    2929          'Hint' => '',
     
    3838class PageWiki extends Page
    3939{
    40   function Show()
     40  function Show(): string
    4141  {
    4242    if (array_key_exists('Action', $_GET))
Note: See TracChangeset for help on using the changeset viewer.