Changeset 888 for trunk/Modules/User


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/User
Files:
5 edited

Legend:

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