A free, self-hostable news aggregator…
Corrections mode anonyme avec formulaire
Alexandre Alapetitedda7b002def5
diff --git a/app/Controllers/indexController.php b/app/Controllers/indexController.phpindex 772a08f30..d05a106bb 100755--- a/app/Controllers/indexController.php+++ b/app/Controllers/indexController.php@@ -296,7 +296,6 @@ class FreshRSS_index_Controller extends Minz_ActionController {}public function formLoginAction () {- $this->view->_useLayout (false);if (Minz_Request::isPost()) {$ok = false;$nonce = Minz_Session::param('nonce');@@ -327,9 +326,10 @@ class FreshRSS_index_Controller extends Minz_ActionController {);Minz_Session::_param('notification', $notif);}+ $this->view->_useLayout(false);+ Minz_Request::forward(array('c' => 'index', 'a' => 'index'), true);}invalidateHttpCache();- Minz_Request::forward(array('c' => 'index', 'a' => 'index'), true);}public function formLogoutAction () {diff --git a/app/layout/header.phtml b/app/layout/header.phtmlindex e90da6196..d43f682b0 100644--- a/app/layout/header.phtml+++ b/app/layout/header.phtml@@ -90,9 +90,16 @@ if (Minz_Configuration::canLogIn()) {</ul></div></div>- <?php }/* elseif (Minz_Configuration::authType() === 'persona') { ?>- <div class="item configure">- <?php echo FreshRSS_Themes::icon('login'); ?> <a class="signin" href="#"><?php echo Minz_Translate::t ('login'); ?></a>- </div>- <?php }*/ ?>+ <?php } elseif (Minz_Configuration::canLogIn()) {+ ?><div class="item configure"><?php+ switch (Minz_Configuration::authType()) {+ case 'form':+ echo FreshRSS_Themes::icon('login'); ?><a class="signin" href="<?php echo _url ('index', 'formLogin'); ?>"><?php echo Minz_Translate::t ('login'); ?></a></li><?php+ break;+ case 'persona':+ echo FreshRSS_Themes::icon('login'); ?><a class="signin" href="#"><?php echo Minz_Translate::t ('login'); ?></a></li><?php+ break;+ }+ ?></div><?php+ } ?></div>diff --git a/app/views/helpers/view/login.phtml b/app/views/index/formLogin.phtmlsimilarity index 100%rename from app/views/helpers/view/login.phtmlrename to app/views/index/formLogin.phtmldiff --git a/app/views/index/index.phtml b/app/views/index/index.phtmlindex 9b69233e9..9a7c9f3b9 100644--- a/app/views/index/index.phtml+++ b/app/views/index/index.phtml@@ -21,8 +21,8 @@ if ($this->loginOk || Minz_Configuration::allowAnonymous()) {if ($token_is_ok) {$this->renderHelper ('view/rss_view');} else {- $this->renderHelper ('view/login');+ Minz_Request::forward(array('c' => 'index', 'a' => 'formLogin'), true);}} else {- $this->renderHelper ('view/login');+ Minz_Request::forward(array('c' => 'index', 'a' => 'formLogin'), true);}