summaryrefslogtreecommitdiff
path: root/app/views/index/index.phtml
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2013-08-21 16:04:18 +0200
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2013-08-21 16:04:18 +0200
commit54541608ac979dfc6044c89cb30493704dcc94c8 (patch)
tree68c73aebd62f59e0d86c04526732a37bfaf7db07 /app/views/index/index.phtml
parent456c95d2dbb40d358d79f426f68eb03f5f447945 (diff)
Fix issue #127 : ajout système de token
Ajout du système de token pour accéder aux flux RSS même quand la connexion a été paramétrée. Pour l'utiliser, il faut simplement ajouter le paramètre ?token=<votre_token> à l'url
Diffstat (limited to 'app/views/index/index.phtml')
-rw-r--r--app/views/index/index.phtml6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/views/index/index.phtml b/app/views/index/index.phtml
index 4bf82f9b4..73e5fcc4d 100644
--- a/app/views/index/index.phtml
+++ b/app/views/index/index.phtml
@@ -1,10 +1,14 @@
<?php
$output = Request::param ('output', 'normal');
+$token = $this->conf->token();
+$token_param = Request::param ('token', '');
+$token_is_ok = ($token != '' && $token == $token_param);
if(!login_is_conf ($this->conf) ||
is_logged() ||
- $this->conf->anonAccess() == 'yes') {
+ $this->conf->anonAccess() == 'yes' ||
+ ($output == 'rss' && $token_is_ok)) {
if($output == 'rss') {
$this->renderHelper ('view/rss_view');
} elseif($output == 'reader') {