Changeset 893 for trunk/Modules/Admin


Ignore:
Timestamp:
Mar 6, 2023, 1:48:45 AM (21 months ago)
Author:
chronos
Message:
  • Fixed: Class types casting for better type checking.
  • Fixed: XML direct export.
  • Modified: User class instance moved from Core class to ModuleUser class.
File:
1 edited

Legend:

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

    r888 r893  
    3434
    3535    $Output .= '<br />'.
    36       '<a href="https://'.$this->System->Config['Web']['Host'].'/phpmyadmin/">'.T('Database management').'</a><br/>'.
     36      '<a href="https://'.Core::Cast($this->System)->Config['Web']['Host'].'/phpmyadmin/">'.T('Database management').'</a><br/>'.
    3737      '<small>Rozhraní phpMyAdmin pro přímou správu databáze</small><br/><br/>'.
    3838      '<a href="'.$this->System->Link('/import/').'">'.T('Text import').'</a><br/>'.
     
    114114  function RepairVersionEnd()
    115115  {
    116     $TranslationTree = $this->System->ModuleManager->Modules['Translation']->GetTranslationTree();
     116    $TranslationTree = ModuleTranslation::Cast($this->System->ModuleManager->GetModule('Translation'))->GetTranslationTree();
    117117
    118118    $Output = '';
     
    149149  function MergeSameText()
    150150  {
    151     $TranslationTree = $this->System->ModuleManager->Modules['Translation']->GetTranslationTree();
     151    $TranslationTree = ModuleTranslation::Cast($this->System->ModuleManager->GetModule('Translation'))->GetTranslationTree();
    152152
    153153    $Output = '';
     
    205205  function DbcStructure()
    206206  {
    207     $TranslationTree = $this->System->ModuleManager->Modules['Translation']->GetTranslationTree();
     207    $TranslationTree = ModuleTranslation::Cast($this->System->ModuleManager->GetModule('Translation'))->GetTranslationTree();
    208208
    209209    $Output = '';
     
    213213    }
    214214    if (!array_key_exists('GameVersion', $_SESSION))
    215       $_SESSION['GameVersion'] = $this->System->Config['Web']['GameVersion'];
     215      $_SESSION['GameVersion'] = Core::Cast($this->System)->Config['Web']['GameVersion'];
    216216
    217217      $Output .= '<br />Nastavená verze: '.$_SESSION['GameVersion'].'<br />';
     
    295295  function ShowLocale()
    296296  {
    297     $this->System->LocaleManager->UpdateAll(dirname(dirname(__FILE__)));
     297    Core::Cast($this->System)->LocaleManager->UpdateAll(dirname(dirname(__FILE__)));
    298298    $Output = 'Překlad rozhraní přegenerován';
    299299    $Output .= '<table class="BaseTable"><tr><th>Originál</th><th>Překlad</th></tr>';
    300     foreach ($this->System->LocaleManager->CurrentLocale->Texts->Data as $Index => $Item)
     300    foreach (Core::Cast($this->System)->LocaleManager->CurrentLocale->Texts->Data as $Index => $Item)
    301301      $Output .= '<tr><td>'.$Index.'</td><td>'.$Item.'</td></tr>';
    302302    $Output .= '</table>';
     
    307307  function Show(): string
    308308  {
     309    $User = ModuleUser::Cast($this->System->GetModule('User'))->User;
    309310    $this->Title = T('Administration');
    310311    $Output = '';
    311     if ($this->System->User->Licence(LICENCE_ADMIN))
     312    if ($User->Licence(LICENCE_ADMIN))
    312313    {
    313314      if (array_key_exists('action', $_GET))
Note: See TracChangeset for help on using the changeset viewer.