aboutsummaryrefslogtreecommitdiff
path: root/app/views/index/index.phtml
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/index/index.phtml')
-rw-r--r--app/views/index/index.phtml17
1 files changed, 6 insertions, 11 deletions
diff --git a/app/views/index/index.phtml b/app/views/index/index.phtml
index 4545a33e4..1ff36ca8e 100644
--- a/app/views/index/index.phtml
+++ b/app/views/index/index.phtml
@@ -5,26 +5,21 @@ $output = Minz_Request::param ('output', 'normal');
if ($this->loginOk || Minz_Configuration::allowAnonymous()) {
if ($output === 'normal') {
$this->renderHelper ('view/normal_view');
- } elseif ($output === 'rss') {
- $this->renderHelper ('view/rss_view');
} elseif ($output === 'reader') {
$this->renderHelper ('view/reader_view');
} elseif ($output === 'global') {
$this->renderHelper ('view/global_view');
+ } elseif ($output === 'rss') {
+ $this->renderHelper ('view/rss_view');
} else {
Minz_Request::_param ('output', 'normal');
$output = 'normal';
$this->renderHelper ('view/normal_view');
}
} elseif ($output === 'rss') {
- $token = $this->conf->token;
- $token_param = Minz_Request::param ('token', '');
- $token_is_ok = ($token != '' && $token == $token_param);
- if ($token_is_ok) {
- $this->renderHelper ('view/rss_view');
- } else {
- Minz_Request::forward(array('c' => 'index', 'a' => 'formLogin'), true);
- }
+ // token has already been checked in the controller so we can show the view
+ $this->renderHelper ('view/rss_view');
} else {
- Minz_Request::forward(array('c' => 'index', 'a' => 'formLogin'), true);
+ // Normally, it should not happen, but log it anyway
+ Minz_Log::record ('Something is wrong in ' . __FILE__ . ' line ' . __LINE__, Minz_Log::ERROR);
}