aboutsummaryrefslogtreecommitdiff
path: root/app/controllers/indexController.php
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2013-11-08 22:38:38 +0100
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2013-11-08 22:38:38 +0100
commit2d330e43f23ba8d600e9fd20b8f5799fb4afb8ab (patch)
tree234986b9b14a2eba114599f1d84cc908fe8778a1 /app/controllers/indexController.php
parent38cf6946ed2fdbf1149978428ed93053dd9a375a (diff)
Fix issue #236: balise link pour flux rss
Ajout d'une balise link pour indiquer l'url du flux RSS
Diffstat (limited to 'app/controllers/indexController.php')
-rwxr-xr-xapp/controllers/indexController.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/app/controllers/indexController.php b/app/controllers/indexController.php
index 17feaf94b..c818f1170 100755
--- a/app/controllers/indexController.php
+++ b/app/controllers/indexController.php
@@ -12,6 +12,7 @@ class indexController extends ActionController {
$token_param = Request::param ('token', '');
$token_is_ok = ($token != '' && $token == $token_param);
+ // check if user is log in
if(login_is_conf ($this->view->conf) &&
!is_logged() &&
$this->view->conf->anonAccess() == 'no' &&
@@ -19,7 +20,25 @@ class indexController extends ActionController {
return;
}
+ // construction of RSS url of this feed
+ $params = Request::params ();
+ $params['output'] = 'rss';
+ if (isset ($params['search'])) {
+ $params['search'] = urlencode ($params['search']);
+ }
+ if (login_is_conf($this->view->conf) &&
+ $this->view->conf->anonAccess() == 'no' &&
+ $token != '') {
+ $params['token'] = $token;
+ }
+ $this->view->rss_url = array (
+ 'c' => 'index',
+ 'a' => 'index',
+ 'params' => $params
+ );
+
if ($output == 'rss') {
+ // no layout for RSS output
$this->view->_useLayout (false);
} else {
if(!$output) {