Changeset 888 for trunk/Modules
- Timestamp:
- Dec 27, 2022, 7:50:23 PM (2 years ago)
- Location:
- trunk/Modules
- Files:
-
- 37 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Admin/Admin.php
r884 r888 1 1 <?php 2 2 3 class ModuleAdmin extends AppModule3 class ModuleAdmin extends Module 4 4 { 5 5 function __construct(System $System) … … 14 14 } 15 15 16 function DoStart() 17 { 18 $this->System->RegisterMenuItem(array(16 function DoStart(): void 17 { 18 Core::Cast($this->System)->RegisterMenuItem(array( 19 19 'Title' => T('Administration'), 20 20 'Hint' => T('Administration tools'), … … 23 23 'Icon' => '', 24 24 )); 25 $this->System->RegisterPage( 'admin', 'PageAdmin');25 $this->System->RegisterPage(['admin'], 'PageAdmin'); 26 26 } 27 27 } … … 305 305 } 306 306 307 function Show() 307 function Show(): string 308 308 { 309 309 $this->Title = T('Administration'); -
trunk/Modules/AoWoW/AoWoW.php
r880 r888 1 1 <?php 2 2 3 class ModuleAoWoW extends AppModule3 class ModuleAoWoW extends Module 4 4 { 5 5 function __construct(System $System) … … 14 14 } 15 15 16 function DoStart() 16 function DoStart(): void 17 17 { 18 $this->System->RegisterMenuItem(array(18 Core::Cast($this->System)->RegisterMenuItem(array( 19 19 'Title' => 'AoWoW', 20 20 'Hint' => 'Vyhledávací databáze podobná WoWHead s překlady', -
trunk/Modules/ClientVersion/ClientVersion.php
r880 r888 1 1 <?php 2 2 3 class ModuleClientVersion extends AppModule3 class ModuleClientVersion extends Module 4 4 { 5 5 function __construct(System $System) … … 14 14 } 15 15 16 function DoStart() 16 function DoStart(): void 17 17 { 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( 20 20 'Title' => T('Game version'), 21 21 'Hint' => T('List of the game client versions'), … … 29 29 class PageClientVersion extends Page 30 30 { 31 function Show() 31 function Show(): string 32 32 { 33 33 if (array_key_exists('action', $_GET)) -
trunk/Modules/Dictionary/Dictionary.php
r880 r888 1 1 <?php 2 2 3 class ModuleDictionary extends AppModule3 class ModuleDictionary extends Module 4 4 { 5 5 function __construct(System $System) … … 14 14 } 15 15 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( 20 20 'Name' => 'Dictionary', 21 21 'Title' => T('Dictionary'), … … 311 311 } 312 312 313 function Show() 313 function Show(): string 314 314 { 315 315 global $LanguageList; -
trunk/Modules/Download/Download.php
r880 r888 1 1 <?php 2 2 3 class ModuleDownload extends AppModule3 class ModuleDownload extends Module 4 4 { 5 5 function __construct(System $System) … … 14 14 } 15 15 16 function DoStart() 16 function DoStart(): void 17 17 { 18 $this->System->RegisterPage( 'download', 'PageDownload');19 $this->System->RegisterMenuItem(array(18 $this->System->RegisterPage(['download'], 'PageDownload'); 19 Core::Cast($this->System)->RegisterMenuItem(array( 20 20 'Title' => T('Download'), 21 21 'Hint' => T('List of files for download'), … … 147 147 } 148 148 149 function Show() 149 function Show(): string 150 150 { 151 151 $this->Title = T('Download'); -
trunk/Modules/Error/Error.php
r880 r888 1 1 <?php 2 2 3 class ModuleError extends AppModule3 class ModuleError extends Module 4 4 { 5 5 var $OnError; … … 21 21 } 22 22 23 function DoStart() 23 function DoStart(): void 24 24 { 25 25 if (isset($this->System->Config['Web']['ShowPHPError'])) … … 29 29 } 30 30 31 function DoStop() 31 function DoStop(): void 32 32 { 33 33 $this->ErrorHandler->Stop(); -
trunk/Modules/Export/CreateAddon.php
r880 r888 267 267 $Buffer = ' 268 268 Čeština pro klienty: 269 Vytvořeno v projektu http ://wowpreklad.zdechov.net/269 Vytvořeno v projektu https://wowpreklad.zdechov.net/ 270 270 Obsahuje Fonty pro správné zobrazování českých znaků, WoW addon překládající 271 271 texty -
trunk/Modules/Export/Export.php
r882 r888 1 1 <?php 2 3 class 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&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 } 2 64 3 65 class Export extends Model … … 601 663 '<table cellspacing="10"><tr><td valign="top">'. 602 664 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>'. 605 667 606 668 … … 609 671 '<li>Požadovaná verze klienta: '.$this->ClientVersion['Version'].'</li>'. 610 672 '<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>'. 612 674 //'<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>'. 613 675 //'<li>Sestavil: Maron</li>'. … … 716 778 include_once(dirname(__FILE__).'/ExportOutput.php'); 717 779 718 class ModuleExport extends AppModule719 {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->Id751 while ($Task = $DbResult->fetch_assoc())752 {753 $Export = '<a href="'.$this->System->Link('/export/?Action=View&ExportId='.$Task['Export']).'">'.$Task['Export'].'</a>';754 if ($TaskId == $Task['Export'])755 $Export = ''.$Export.' (tento)';756 757 // Show progress bar758 $Output .= ' <strong>Export '.$Export.':</strong> <div id="progress'.$Task['Export'].'">'.759 '<strong>'.ProgressBar(300, $Task['Progress']).'</strong> ';760 761 // Show estimated time to complete762 $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 813 813 } 814 814 815 function Show() 815 function Show(): string 816 816 { 817 817 $this->Title = T('Export'); … … 837 837 } 838 838 839 function Show() 839 function Show(): string 840 840 { 841 841 if (array_key_exists('i', $_GET)) -
trunk/Modules/Export/cmdmpqexport.php
r880 r888 138 138 '<table cellspacing="10"><tr><td valign="top">'. 139 139 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>'. 142 142 143 143 … … 146 146 '<li>Požadovaná verze klienta: '.$Export->ClientVersion['Version'].'</li>'. 147 147 '<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>'. 149 149 //'<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>'. 150 150 //'<li>Sestavil: Maron</li>'. -
trunk/Modules/Forum/Forum.php
r880 r888 1 1 <?php 2 2 3 class ModuleForum extends AppModule3 class ModuleForum extends Module 4 4 { 5 5 function __construct(System $System) … … 14 14 } 15 15 16 function DoStart() 17 { 18 $this->System->RegisterPage( 'forum', 'PageForum');16 function DoStart(): void 17 { 18 $this->System->RegisterPage(['forum'], 'PageForum'); 19 19 $this->System->ModuleManager->Modules['News']->RegisterRSS(array( 20 20 'Title' => T('Forum'), 'Channel' => 'forum', 'Callback' => array('PageForum', 'ShowRSS'), … … 29 29 $this->System->Link('/forum/?search=')); 30 30 31 $this->System->RegisterMenuItem(array(31 Core::Cast($this->System)->RegisterMenuItem(array( 32 32 'Title' => T('Forum'), 33 33 'Hint' => T('Forum about translation wow'), … … 68 68 class PageForum extends Page 69 69 { 70 function Show() 70 function Show(): string 71 71 { 72 72 $Output = ''; … … 181 181 $Output = ''; 182 182 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'))); 184 184 185 185 if (array_key_exists('search', $_GET)) $_SESSION['search'] = $_GET['search']; … … 205 205 $Output .= '<div class="shoutbox">'; 206 206 $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 { 209 210 if ($this->System->User->Id == $Line['User']) 211 { 210 212 $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']))); 212 215 $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> '; 215 217 } 216 218 $Output .= '</div>'.$PageList['Output']; … … 243 245 if ($this->System->User->Licence(LICENCE_USER)) 244 246 { 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 />'; 249 250 else $Output .= '<input type="text" name="user" /><br />'; 250 251 $Output .= T('Name of thread').': <br />'. -
trunk/Modules/FrontPage/FrontPage.php
r880 r888 1 1 <?php 2 2 3 class ModuleFrontPage extends AppModule3 class ModuleFrontPage extends Module 4 4 { 5 5 function __construct(System $System) … … 15 15 } 16 16 17 function DoStart() 17 function DoStart(): void 18 18 { 19 $this->System->RegisterPage( '', 'PageFrontPage');20 $this->System->RegisterMenuItem(array(19 $this->System->RegisterPage([''], 'PageFrontPage'); 20 Core::Cast($this->System)->RegisterMenuItem(array( 21 21 'Title' => T('Home'), 22 22 'Hint' => T('Main page'), … … 71 71 class PageFrontPage extends Page 72 72 { 73 function Show() 73 function Show(): string 74 74 { 75 75 global $Message, $MessageType; -
trunk/Modules/Import/Import.php
r880 r888 5 5 6 6 7 class ModuleImport extends AppModule7 class ModuleImport extends Module 8 8 { 9 9 function __construct(System $System) … … 18 18 } 19 19 20 function DoStart() 21 { 22 $this->System->RegisterPage( 'import', 'PageImport');20 function DoStart(): void 21 { 22 $this->System->RegisterPage(['import'], 'PageImport'); 23 23 } 24 24 } -
trunk/Modules/Import/Manage.php
r880 r888 96 96 } 97 97 98 function Show() 98 function Show(): string 99 99 { 100 100 $this->Title = T('Import'); -
trunk/Modules/Info/Info.php
r880 r888 1 1 <?php 2 2 3 class ModuleInfo extends AppModule3 class ModuleInfo extends Module 4 4 { 5 5 function __construct(System $System) … … 14 14 } 15 15 16 function DoStart() 16 function DoStart(): void 17 17 { 18 $this->System->RegisterMenuItem(array(18 Core::Cast($this->System)->RegisterMenuItem(array( 19 19 'Title' => T('Instructions'), 20 20 'Hint' => 'Informace k překladu hry', … … 23 23 'Icon' => '', 24 24 )); 25 $this->System->RegisterPage( 'info', 'PageInfo');26 $this->System->RegisterMenuItem(array(25 $this->System->RegisterPage(['info'], 'PageInfo'); 26 Core::Cast($this->System)->RegisterMenuItem(array( 27 27 'Title' => T('Presentation'), 28 28 'Hint' => 'Prezentace a motivace překladu', … … 31 31 'Icon' => '', 32 32 )); 33 $this->System->RegisterPage( 'promotion', 'PagePromotion');33 $this->System->RegisterPage(['promotion'], 'PagePromotion'); 34 34 } 35 35 } … … 37 37 class PageInfo extends Page 38 38 { 39 function Show() 39 function Show(): string 40 40 { 41 41 $this->Title = T('Information for translators'); … … 75 75 class PagePromotion extends Page 76 76 { 77 function Show() 77 function Show(): string 78 78 { 79 79 $this->Title = T('Promotion'); -
trunk/Modules/Log/Log.php
r884 r888 1 1 <?php 2 2 3 class ModuleLog extends AppModule3 class ModuleLog extends Module 4 4 { 5 5 var $Excludes; … … 18 18 } 19 19 20 function DoStart() 21 { 22 $this->System->RegisterPage( 'log', 'PageLog');20 function DoStart(): void 21 { 22 $this->System->RegisterPage(['log'], 'PageLog'); 23 23 $this->System->ModuleManager->Modules['Error']->OnError[] = array($this, 'DoAddItem'); 24 24 $this->System->ModuleManager->Modules['News']->RegisterRSS(array('Title' => T('Logs'), … … 109 109 } 110 110 111 function Show() 111 function Show(): string 112 112 { 113 113 if (array_key_exists('a', $_POST)) $Action = $_POST['a']; -
trunk/Modules/News/News.php
r880 r888 3 3 include_once(dirname(__FILE__).'/RSS.php'); 4 4 5 class ModuleNews extends AppModule5 class ModuleNews extends Module 6 6 { 7 7 var $RSSChannels; … … 19 19 } 20 20 21 function DoStart() 21 function DoStart(): void 22 22 { 23 $this->System->RegisterPage( 'news', 'PageNews');24 $this->System->RegisterPage( 'rss', 'PageRSS');23 $this->System->RegisterPage(['news'], 'PageNews'); 24 $this->System->RegisterPage(['rss'], 'PageRSS'); 25 25 $this->RegisterRSS(array('Title' => T('News'), 'Channel' => 'news', 26 26 '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')); 28 28 } 29 29 … … 69 69 class PageNews extends Page 70 70 { 71 function Show() 71 function Show(): string 72 72 { 73 73 $this->Title = T('News'); -
trunk/Modules/News/RSS.php
r880 r888 31 31 class PageRSS extends Page 32 32 { 33 function Show() 33 function Show(): string 34 34 { 35 35 $this->RawPage = true; -
trunk/Modules/Redirection/Redirection.php
r880 r888 1 1 <?php 2 2 3 class ModuleRedirection extends AppModule3 class ModuleRedirection extends Module 4 4 { 5 5 function __construct(System $System) … … 15 15 } 16 16 17 function DoStart() 17 function DoStart(): void 18 18 { 19 19 $this->System->OnPageNotFound = array($this, 'ShowRedirect'); -
trunk/Modules/Referrer/Referrer.php
r880 r888 1 1 <?php 2 2 3 class ModuleReferrer extends AppModule3 class ModuleReferrer extends Module 4 4 { 5 5 var $Excludes; … … 18 18 } 19 19 20 function DoStart() 20 function DoStart(): void 21 21 { 22 22 $this->Excludes[] = $this->System->Config['Web']['Host']; 23 23 $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( 26 26 'Title' => T('Promotion'), 27 27 'Hint' => 'Informace k propagaci tohoto projektu', … … 246 246 } 247 247 248 function Show() 248 function Show(): string 249 249 { 250 250 $this->Title = T('Promotion'); -
trunk/Modules/Search/Search.php
r880 r888 1 1 <?php 2 2 3 class ModuleSearch extends AppModule3 class ModuleSearch extends Module 4 4 { 5 5 var $SearchItems; … … 17 17 } 18 18 19 function DoStart() 19 function DoStart(): void 20 20 { 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')); 23 23 } 24 24 … … 54 54 class PageSearch extends Page 55 55 { 56 function Show() 56 function Show(): string 57 57 { 58 58 $this->Title = T('Search'); -
trunk/Modules/Server/Server.php
r880 r888 1 1 <?php 2 2 3 class ModuleServer extends AppModule3 class ModuleServer extends Module 4 4 { 5 5 function __construct(System $System) … … 14 14 } 15 15 16 function DoStart() 16 function DoStart(): void 17 17 { 18 $this->System->RegisterPage( 'server', 'PageServerList');19 $this->System->RegisterMenuItem(array(18 $this->System->RegisterPage(['server'], 'PageServerList'); 19 Core::Cast($this->System)->RegisterMenuItem(array( 20 20 'Title' => T('Servers'), 21 21 'Hint' => 'Seznam serverů, kde je nasazena čeština v praxi', -
trunk/Modules/ShoutBox/ShoutBox.php
r880 r888 1 1 <?php 2 2 3 class ModuleShoutBox extends AppModule3 class ModuleShoutBox extends Module 4 4 { 5 5 function __construct(System $System) … … 14 14 } 15 15 16 function DoStart() 16 function DoStart(): void 17 17 { 18 $this->System->RegisterPage( 'shoutbox', 'PageShoutBox');18 $this->System->RegisterPage(['shoutbox'], 'PageShoutBox'); 19 19 $this->System->ModuleManager->Modules['News']->RegisterRSS(array( 20 20 'Title' => T('Shoutbox'), 'Channel' => 'shoutbox', 'Callback' => array('PageShoutBox', 'ShowRSS'), … … 42 42 class PageShoutBox extends Page 43 43 { 44 function Show() 44 function Show(): string 45 45 { 46 46 $this->Title = T('Shoutbox'); -
trunk/Modules/Team/Team.php
r880 r888 1 1 <?php 2 2 3 class ModuleTeam extends AppModule3 class ModuleTeam extends Module 4 4 { 5 5 function __construct(System $System) … … 14 14 } 15 15 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( 20 20 'Title' => T('Teams'), 21 21 'Hint' => T('List of translating teams'), … … 162 162 '<tr><td colspan="2"><input type="submit" value="'.T('Save').'" /></td></tr>'. 163 163 '</table></fieldset></form>'; 164 } else $Output = ShowMes age('Tým nenalezen.', MESSAGE_CRITICAL);164 } else $Output = ShowMessage('Tým nenalezen.', MESSAGE_CRITICAL); 165 165 } else $Output = ShowMessage('Nezadáno id týmu', MESSAGE_CRITICAL); 166 166 } else $Output = ShowMessage(T('Access denied'), MESSAGE_CRITICAL); … … 328 328 } 329 329 330 function Show() 330 function Show(): string 331 331 { 332 332 if (array_key_exists('action', $_GET)) -
trunk/Modules/Translation/Comparison.php
r880 r888 38 38 } 39 39 40 function Show() 40 function Show(): string 41 41 { 42 42 $TranslationTree = $this->System->ModuleManager->Modules['Translation']->GetTranslationTree(); -
trunk/Modules/Translation/Form.php
r880 r888 6 6 var $ID; 7 7 8 function Show() 8 function Show(): string 9 9 { 10 10 $this->Title = T('Translation'); … … 17 17 } 18 18 19 function ShowForm() 19 function ShowForm(): string 20 20 { 21 21 $TranslationTree = $this->System->ModuleManager->Modules['Translation']->GetTranslationTree(); -
trunk/Modules/Translation/LoadNames.php
r880 r888 90 90 } 91 91 92 function Show() 92 function Show(): string 93 93 { 94 94 $this->RawPage = true; -
trunk/Modules/Translation/Progress.php
r880 r888 64 64 } 65 65 66 function Show() 66 function Show(): string 67 67 { 68 68 $this->Title = T('Progress'); -
trunk/Modules/Translation/Save.php
r880 r888 174 174 } 175 175 176 function Show() 176 function Show(): string 177 177 { 178 178 global $Message, $MessageType; -
trunk/Modules/Translation/Translation.php
r880 r888 9 9 include_once(dirname(__FILE__).'/UserLevel.php'); 10 10 11 class ModuleTranslation extends AppModule11 class ModuleTranslation extends Module 12 12 { 13 13 function __construct(System $System) … … 22 22 } 23 23 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'); 33 33 $this->System->ModuleManager->Modules['News']->RegisterRSS(array('Title' => T('Last translations'), 34 34 'Channel' => 'translation', 'Callback' => array($this, 'ShowRSS'), 'Permission' => LICENCE_ANONYMOUS)); 35 $this->System->RegisterMenuItem(array(35 Core::Cast($this->System)->RegisterMenuItem(array( 36 36 'Title' => T('Completion status'), 37 37 'Hint' => 'Stav dokončení překládů', … … 40 40 'Icon' => '', 41 41 ), 1); 42 $this->System->RegisterMenuItem(array(42 Core::Cast($this->System)->RegisterMenuItem(array( 43 43 'Title' => T('Data source'), 44 44 'Hint' => 'Informace o překladových skupinách', … … 66 66 } 67 67 } 68 $this->System->RegisterPageBarItem('Right', 'TranslatedMenu', array($this, 'ShowTranslatedMenu'));68 Core::Cast($this->System)->RegisterPageBarItem('Right', 'TranslatedMenu', array($this, 'ShowTranslatedMenu')); 69 69 } 70 70 -
trunk/Modules/Translation/TranslationList.php
r880 r888 376 376 } 377 377 378 function Show() 378 function Show(): string 379 379 { 380 380 $this->Title = T('Translation groups'); … … 521 521 } 522 522 523 function Show() 523 function Show(): string 524 524 { 525 525 $this->Title = T('Translation groups'); -
trunk/Modules/User/Options.php
r884 r888 134 134 } 135 135 136 function Show() 136 function Show(): string 137 137 { 138 138 $this->Title = T('User settings'); -
trunk/Modules/User/Profile.php
r880 r888 246 246 } 247 247 248 function Show() 248 function Show(): string 249 249 { 250 250 $this->Title = T('User profile'); -
trunk/Modules/User/Registration.php
r884 r888 159 159 } 160 160 161 function Show() 161 function Show(): string 162 162 { 163 163 $this->Title = T('User registration'); -
trunk/Modules/User/User.php
r884 r888 6 6 include_once(dirname(__FILE__).'/Profile.php'); 7 7 8 class ModuleUser extends AppModule8 class ModuleUser extends Module 9 9 { 10 10 function __construct(System $System) … … 19 19 } 20 20 21 function DoStart() 21 function DoStart(): void 22 22 { 23 23 $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( 30 30 'Title' => T('Translators'), 31 31 'Hint' => 'Seznam registrovaných uživatelů', … … 37 37 $this->System->ModuleManager->Modules['Search']->RegisterSearch('user', 38 38 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')); 41 41 } 42 42 … … 85 85 class PageUserLogin extends Page 86 86 { 87 function Show() 87 function Show(): string 88 88 { 89 89 $Output = '<form action="'.$this->System->Link('/?action=login').'" method="post" class="Form">'. -
trunk/Modules/User/UserList.php
r880 r888 3 3 class PageUserList extends Page 4 4 { 5 function Show() 5 function Show(): string 6 6 { 7 7 $this->Title = T('Translators'); -
trunk/Modules/Wiki/Wiki.php
r880 r888 1 1 <?php 2 2 3 class ModuleWiki extends AppModule3 class ModuleWiki extends Module 4 4 { 5 5 function __construct(System $System) … … 14 14 } 15 15 16 function DoStart() 16 function DoStart(): void 17 17 { 18 18 $this->LoadPages(); … … 25 25 { 26 26 $this->System->RegisterPage($DbRow['NormalizedName'], 'PageWiki'); 27 $this->System->RegisterMenuItem(array(27 Core::Cast($this->System)->RegisterMenuItem(array( 28 28 'Title' => $DbRow['Name'], 29 29 'Hint' => '', … … 38 38 class PageWiki extends Page 39 39 { 40 function Show() 40 function Show(): string 41 41 { 42 42 if (array_key_exists('Action', $_GET))
Note:
See TracChangeset
for help on using the changeset viewer.