diff options
| author | 2014-02-15 10:44:37 +0100 | |
|---|---|---|
| committer | 2014-02-15 10:44:37 +0100 | |
| commit | fb7bc50673f226070c5399bd6bbf07b91eeda01e (patch) | |
| tree | 02aaca90641da832b41d376d3eb43ae12f5adc8c /app/Controllers/indexController.php | |
| parent | 595bf40c7042e565737641677525301cf79aa184 (diff) | |
Fix bug token
The token should appear in RSS feed url when anonymous are not allowed
Diffstat (limited to 'app/Controllers/indexController.php')
| -rwxr-xr-x | app/Controllers/indexController.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/app/Controllers/indexController.php b/app/Controllers/indexController.php index 986a322a1..af08edb46 100755 --- a/app/Controllers/indexController.php +++ b/app/Controllers/indexController.php @@ -5,18 +5,15 @@ class FreshRSS_index_Controller extends Minz_ActionController { public function indexAction () { $output = Minz_Request::param ('output'); - $token = ''; + $token = $this->view->conf->token; // check if user is logged in - if (!$this->view->loginOk && !Minz_Configuration::allowAnonymous()) - { - $token = $this->view->conf->token; + if (!$this->view->loginOk && !Minz_Configuration::allowAnonymous()) { $token_param = Minz_Request::param ('token', ''); $token_is_ok = ($token != '' && $token === $token_param); if (!($output === 'rss' && $token_is_ok)) { return; } - $params['token'] = $token; } // construction of RSS url of this feed @@ -25,6 +22,9 @@ class FreshRSS_index_Controller extends Minz_ActionController { if (isset ($params['search'])) { $params['search'] = urlencode ($params['search']); } + if (!Minz_Configuration::allowAnonymous()) { + $params['token'] = $token; + } $this->view->rss_url = array ( 'c' => 'index', 'a' => 'index', |
