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.
File:
1 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';
Note: See TracChangeset for help on using the changeset viewer.