diff options
| author | 2012-10-25 19:06:32 +0200 | |
|---|---|---|
| committer | 2012-10-25 19:06:32 +0200 | |
| commit | 3ff51a59ba97f3ef1df3c26df16d9a3ab5789843 (patch) | |
| tree | 89de7b553f5b8240ad0d9f766800973f9845a121 /app/controllers/configureController.php | |
| parent | 48a1aa7d52e712d5f64a33a003b31f23a00b99f5 (diff) | |
Ajout fonctionnalité connexion avec Persona (à améliorer sans doute)
Diffstat (limited to 'app/controllers/configureController.php')
| -rwxr-xr-x | app/controllers/configureController.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/app/controllers/configureController.php b/app/controllers/configureController.php index 849066ad7..68fa0404a 100755 --- a/app/controllers/configureController.php +++ b/app/controllers/configureController.php @@ -1,6 +1,15 @@ <?php class configureController extends ActionController { + public function firstAction () { + if (login_is_conf ($this->view->conf) && !is_logged ()) { + Error::error ( + 403, + array ('error' => array ('Vous n\'avez pas le droit d\'accéder à cette page')) + ); + } + } + public function categorizeAction () { $catDAO = new CategoryDAO (); @@ -69,12 +78,14 @@ class configureController extends ActionController { $display = Request::param ('display_posts', 'no'); $sort = Request::param ('sort_order', 'low_to_high'); $old = Request::param ('old_entries', 3); + $mail = Request::param ('mail_login', false); $this->view->conf->_postsPerPage (intval ($nb)); $this->view->conf->_defaultView ($view); $this->view->conf->_displayPosts ($display); $this->view->conf->_sortOrder ($sort); $this->view->conf->_oldEntries ($old); + $this->view->conf->_mailLogin ($mail); $values = array ( 'posts_per_page' => $this->view->conf->postsPerPage (), @@ -82,11 +93,13 @@ class configureController extends ActionController { 'display_posts' => $this->view->conf->displayPosts (), 'sort_order' => $this->view->conf->sortOrder (), 'old_entries' => $this->view->conf->oldEntries (), + 'mail_login' => $this->view->conf->mailLogin (), ); $confDAO = new RSSConfigurationDAO (); $confDAO->update ($values); Session::_param ('conf', $this->view->conf); + Session::_param ('mail', $this->view->conf->mailLogin ()); } } |
