Ignore:
Timestamp:
Nov 20, 2020, 12:08:12 AM (3 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/NetworkShare/SharePage.php

    r874 r887  
    33class SharePage extends Page
    44{
    5   var $FullTitle = 'Prohledávání sdílených souborů';
    6   var $ShortTitle = 'Sdílené soubory';
    7   var $ParentClass = 'PagePortal';
    85  var $Dependencies = array('Log');
    96  var $MaxNesting = 20; // Maximální vnoření
     
    2017  );
    2118
     19  function __construct(System $System)
     20  {
     21    parent::__construct($System);
     22    $this->FullTitle = 'Prohledávání sdílených souborů';
     23    $this->ShortTitle = 'Sdílené soubory';
     24    $this->ParentClass = 'PagePortal';
     25  }
     26
    2227  function ShowTime()
    2328  {
     
    6671  }
    6772
    68   function Show()
    69   {
    70     if (!$this->System->User->CheckPermission('NetworkShare', 'Display')) return 'Nemáte oprávnění';
     73  function Show(): string
     74  {
     75    if (!ModuleUser::Cast($this->System->GetModule('User'))->User->CheckPermission('NetworkShare', 'Display')) return 'Nemáte oprávnění';
    7176
    7277    // If not only online checkbox checked
     
    102107    // Log search
    103108    if (array_key_exists('keyword', $_POST) or array_key_exists('keyword', $_GET))
    104       $this->System->ModuleManager->Modules['Log']->NewRecord('Share', 'Hledaný výraz', $_SESSION['keyword']);
     109      ModuleLog::Cast($this->System->GetModule('Log'))->NewRecord('Share', 'Hledaný výraz', $_SESSION['keyword']);
    105110
    106111    // Zobrazení formuláře
Note: See TracChangeset for help on using the changeset viewer.