Changeset 887 for trunk/Modules/Chat


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/Chat
Files:
2 edited

Legend:

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

    r874 r887  
    33class PageChatHistory extends Page
    44{
    5   function __construct($System)
     5  function __construct(System $System)
    66  {
    77    parent::__construct($System);
     
    1717  }
    1818
    19   function Show()
     19  function Show(): string
    2020  {
    2121    global $MonthNames;
    2222
    23     if (!$this->System->User->CheckPermission('Chat', 'Display')) return 'Nemáte oprávnění';
     23    if (!ModuleUser::Cast($this->System->GetModule('User'))->User->CheckPermission('Chat', 'Display')) return 'Nemáte oprávnění';
    2424
    2525    if (array_key_exists('date', $_GET)) $Date = $_GET['date'];
     
    8787class ModuleChat extends AppModule
    8888{
    89   function __construct($System)
     89  function __construct(System $System)
    9090  {
    9191    parent::__construct($System);
     
    9898  }
    9999
    100   function DoStart()
     100  function DoStart(): void
    101101  {
    102102    $this->System->Pages['chat'] = 'PageChatHistory';
  • trunk/Modules/Chat/irc_bot.php

    r873 r887  
    3939  }
    4040
    41   function Run()
     41  function Run(): void
    4242  {
    4343    global $Database;
     
    195195    echo("-Connection lost.\n");
    196196  }
    197 
    198197}
    199198
Note: See TracChangeset for help on using the changeset viewer.