index.phtml 766 B

1234567891011121314151617181920212223
  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 === 'rss') {
  9. $this->renderHelper('view/rss_view');
  10. } else {
  11. Minz_Request::_param('output', 'normal');
  12. $output = 'normal';
  13. $this->renderHelper('view/normal_view');
  14. }
  15. } elseif ($output === 'rss') {
  16. // token has already been checked in the controller so we can show the view
  17. $this->renderHelper('view/rss_view');
  18. } else {
  19. // Normally, it should not happen, but log it anyway
  20. Minz_Log::error('Something is wrong in ' . __FILE__ . ' line ' . __LINE__);
  21. }