Ignore:
Timestamp:
Apr 14, 2015, 10:20:16 PM (10 years ago)
Author:
chronos
Message:
  • Removed: Spaces on end of line.
  • Modified: Tabs converted to spaces.
File:
1 edited

Legend:

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

    r670 r738  
    1919  function Start()
    2020  {
    21         $this->System->RegisterPage('rss', 'PageRSS');
     21    $this->System->RegisterPage('rss', 'PageRSS');
    2222  }
    2323
     
    4242    $Output = '';
    4343    foreach($this->RSSChannels as $Channel)
    44                 {
    45                   if($this->System->User->Licence($Channel['Permission']))
    46                           $Output .= ' <link rel="alternate" title="'.$Channel['Title'].'" href="'.
    47                         $this->System->Link('/rss/?channel='.$Channel['Channel']).'" type="application/rss+xml" />';
    48                 }
     44    {
     45      if($this->System->User->Licence($Channel['Permission']))
     46        $Output .= ' <link rel="alternate" title="'.$Channel['Title'].'" href="'.
     47          $this->System->Link('/rss/?channel='.$Channel['Channel']).'" type="application/rss+xml" />';
     48    }
    4949    return($Output);
    5050  }
     
    5353class PageRSS extends Page
    5454{
    55         function Show()
    56         {
    57           $this->ClearPage = true;
     55  function Show()
     56  {
     57    $this->ClearPage = true;
    5858
    59           if(array_key_exists('channel', $_GET)) $ChannelName = $_GET['channel'];
    60             else $ChannelName = '';
    61           if(array_key_exists('token', $_GET)) $Token = $_GET['token'];
    62             else $Token = '';
    63           if(array_key_exists($ChannelName, $this->System->ModuleManager->Modules['RSS']->RSSChannels))
    64           {
    65             $Channel = $this->System->ModuleManager->Modules['RSS']->RSSChannels[$ChannelName];
    66             if($this->System->User->CheckPermission($Channel['Permission']['Module'], $Channel['Permission']['Operation']) or
    67             $this->System->User->CheckToken($Channel['Permission']['Module'], $Channel['Permission']['Operation'], $Token))
    68             {
    69             if(is_string($Channel['Callback'][0]))
    70               {
    71                 $Class = new $Channel['Callback'][0]($this->System);
    72                 $Output = $Class->$Channel['Callback'][1]();
    73               } else $Output = call_user_func($Channel['Callback']);
    74             } else $Output = 'Nemáte oprávnění';
    75           } else $Output = 'Kanál nenalezen';
     59    if(array_key_exists('channel', $_GET)) $ChannelName = $_GET['channel'];
     60      else $ChannelName = '';
     61    if(array_key_exists('token', $_GET)) $Token = $_GET['token'];
     62      else $Token = '';
     63    if(array_key_exists($ChannelName, $this->System->ModuleManager->Modules['RSS']->RSSChannels))
     64    {
     65      $Channel = $this->System->ModuleManager->Modules['RSS']->RSSChannels[$ChannelName];
     66      if($this->System->User->CheckPermission($Channel['Permission']['Module'], $Channel['Permission']['Operation']) or
     67      $this->System->User->CheckToken($Channel['Permission']['Module'], $Channel['Permission']['Operation'], $Token))
     68      {
     69        if(is_string($Channel['Callback'][0]))
     70        {
     71          $Class = new $Channel['Callback'][0]($this->System);
     72          $Output = $Class->$Channel['Callback'][1]();
     73        } else $Output = call_user_func($Channel['Callback']);
     74      } else $Output = 'Nemáte oprávnění';
     75    } else $Output = 'Kanál nenalezen';
    7676    return($Output);
    77         }
     77  }
    7878}
Note: See TracChangeset for help on using the changeset viewer.