Ignore:
Timestamp:
Apr 20, 2013, 8:51:15 PM (11 years ago)
Author:
chronos
Message:
  • Upraveno: Definice třída User přesunuta do modulu User. Existuje aplikační modul System->ModuleManager->ModulesUser a samotná instance třídy System->User.
  • Upraveno: Zbylá inicializace starého modulového systému třídy Module přesunuta do startovní části aplikačních modulů.
  • Upraveno: Třída System přesunuta ze souboru Common/Global do samostatného souboru Common/System.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/News/NewsPage.php

    r523 r524  
    3838    {
    3939      case 'view':
    40         if(!$this->System->Modules['User']->CheckPermission('News', 'Display', 'Item')) $Output .= 'Nemáte oprávnění';
     40        if(!$this->System->User->CheckPermission('News', 'Display', 'Item')) $Output .= 'Nemáte oprávnění';
    4141        else
    4242        {
     
    4949              else $Author = $Row['Name'];
    5050            $Output .= '<div class="Panel"><div class="Title">'.$Row['Title'].' ('.HumanDate($Row['Date']).', '.$Author.')';
    51             if($this->System->Modules['User']->User['Id'] == $Row['User'])
     51            if($this->System->User->User['Id'] == $Row['User'])
    5252            {
    5353              $Output .= '<div class="Action">';
     
    7979        while($DbRow = $DbResult->fetch_array())
    8080        {
    81           if($this->System->Modules['User']->CheckPermission('News', 'Insert', 'Group', $DbRow['Id']))
     81          if($this->System->User->CheckPermission('News', 'Insert', 'Group', $DbRow['Id']))
    8282          {
    8383            if($DbRow['Id'] == $Category) $Selected = ' selected="1"'; else $Selected = '';
     
    9898      case 'add2':
    9999        $RemoteAddr = GetRemoteAddress(); 
    100         if($this->System->Modules['User']->CheckPermission('News', 'Insert', 'Group', $Category))
     100        if($this->System->User->CheckPermission('News', 'Insert', 'Group', $Category))
    101101        {
    102102          // Process uploaded file
     
    121121          $this->Database->insert('News', array('Category' => $Category, 'Title' => $_POST['title'],
    122122            'Content' => $_POST['content'], 'Date' => 'NOW()', 'IP' => $RemoteAddr,
    123             'Enclosure' => $Enclosures, 'Author' => $this->System->Modules['User']->User['Name'], 'User' => $this->System->Modules['User']->User['Id'], 'Link' => $_POST['link']));
     123            'Enclosure' => $Enclosures, 'Author' => $this->System->User->User['Name'], 'User' => $this->System->User->User['Id'], 'Link' => $_POST['link']));
    124124          $Output .= 'Aktualita přidána!<br />Pokud budete chtít vaši aktualitu smazat, klikněte na odkaz Smazat v seznamu všech aktualit v kategorii.<br /><br />';
    125125          $Output .= '<a href="?category='.$_POST['category'].'">Zpět na seznam aktualit</a>';
     
    130130        $DbResult = $this->Database->query('SELECT * FROM News WHERE Id='.$_GET['id']);
    131131        $Row = $DbResult->fetch_array();
    132         if($this->System->Modules['User']->User['Id'] == $Row['User'])
     132        if($this->System->User->User['Id'] == $Row['User'])
    133133        {
    134134          $Row['Content'] = str_replace('<br />', '', $Row['Content']);
     
    151151        {
    152152          $Row = $DbResult->fetch_array();
    153           if($this->System->Modules['User']->User['Id'] == $Row['User'])
     153          if($this->System->User->User['Id'] == $Row['User'])
    154154          {
    155155            $_POST['content'] = str_replace("\n", '<br />', $_POST['content']);
Note: See TracChangeset for help on using the changeset viewer.