diff options
| author | Simon | 2011-04-05 16:27:13 +0200 |
|---|---|---|
| committer | Simon | 2011-04-05 16:27:13 +0200 |
| commit | 3def9f74091e1b8616ad2e1870574705e73fc1b1 (patch) | |
| tree | 0c46536b4140d0d4bc8cb6c383296c035450ad44 /application/modules/user/controllers/SessionController.php | |
| parent | Session-Controller erstellt (diff) | |
| download | pbs2-3def9f74091e1b8616ad2e1870574705e73fc1b1.tar.gz pbs2-3def9f74091e1b8616ad2e1870574705e73fc1b1.tar.xz pbs2-3def9f74091e1b8616ad2e1870574705e73fc1b1.zip | |
Suche gefixt & Neues Recht für Session
Diffstat (limited to 'application/modules/user/controllers/SessionController.php')
| -rw-r--r-- | application/modules/user/controllers/SessionController.php | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/application/modules/user/controllers/SessionController.php b/application/modules/user/controllers/SessionController.php index 3c3c192..b027f63 100644 --- a/application/modules/user/controllers/SessionController.php +++ b/application/modules/user/controllers/SessionController.php @@ -23,6 +23,9 @@ class User_SessionController extends Zend_Controller_Action public function indexAction() { + if(!Pbs_Acl::checkRight('so')) + $this->_redirect('/user/index'); + $sessionMapper = new Application_Model_SessionMapper(); $bootisoMapper = new Application_Model_BootIsoMapper(); $bootosMapper = new Application_Model_BootOsMapper(); @@ -54,17 +57,22 @@ class User_SessionController extends Zend_Controller_Action $mySessions[] =$session; } } + // Sort after date/id + usort($mySessions, function($func_a, $func_b) { + if($func_a->getID() == $func_b->getID()) return 0; + return ($func_a->getID() < $func_b->getID()) ? -1 : 1; + }); // Search $search = $this->_request->getParam('search'); $mySearch = new Pbs_Search(); $mySearch->setSearchTerm($search); $mySearch->setModule('session'); - $this->view->searchform = $mySearch->searchForm(); if($search != ''){ $this->view->search = $mySearch->getSearchTerm(); $mySessions = $mySearch->search($mySessions); } + $this->view->searchform = $mySearch->searchForm(); // Pagination $pagination = new Pbs_Pagination(); @@ -79,6 +87,8 @@ class User_SessionController extends Zend_Controller_Action $this->view->sessions = $mySessions; } + + public function searchAction(){ $this->_redirect('/user/session/index/search/'.($_GET['search'])); |
