index.phtml 844 B

12345678910111213141516171819202122232425
  1. <?php
  2. $output = Minz_Request::param('output', 'normal');
  3. if (FreshRSS_Auth::hasAccess() || Minz_Configuration::allowAnonymous()) {
  4. if ($output === 'normal') {
  5. $this->renderHelper('view/normal_view');
  6. } elseif ($output === 'reader') {
  7. $this->renderHelper('view/reader_view');
  8. } elseif ($output === 'global') {
  9. $this->renderHelper('view/global_view');
  10. } elseif ($output === 'rss') {
  11. $this->renderHelper('view/rss_view');
  12. } else {
  13. Minz_Request::_param('output', 'normal');
  14. $output = 'normal';
  15. $this->renderHelper('view/normal_view');
  16. }
  17. } elseif ($output === 'rss') {
  18. // token has already been checked in the controller so we can show the view
  19. $this->renderHelper('view/rss_view');
  20. } else {
  21. // Normally, it should not happen, but log it anyway
  22. Minz_Log::error('Something is wrong in ' . __FILE__ . ' line ' . __LINE__);
  23. }