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.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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">'.
Note: See TracChangeset for help on using the changeset viewer.