Changeset 738 for trunk/Modules/RSS/RSS.php
- Timestamp:
- Apr 14, 2015, 10:20:16 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/RSS/RSS.php
r670 r738 19 19 function Start() 20 20 { 21 21 $this->System->RegisterPage('rss', 'PageRSS'); 22 22 } 23 23 … … 42 42 $Output = ''; 43 43 foreach($this->RSSChannels as $Channel) 44 45 46 47 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 } 49 49 return($Output); 50 50 } … … 53 53 class PageRSS extends Page 54 54 { 55 56 57 55 function Show() 56 { 57 $this->ClearPage = true; 58 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 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'; 76 76 return($Output); 77 77 } 78 78 }
Note:
See TracChangeset
for help on using the changeset viewer.