summaryrefslogtreecommitdiffstats
path: root/application/modules/user/controllers/SessionController.php
diff options
context:
space:
mode:
authorSimon2011-04-05 16:27:13 +0200
committerSimon2011-04-05 16:27:13 +0200
commit3def9f74091e1b8616ad2e1870574705e73fc1b1 (patch)
tree0c46536b4140d0d4bc8cb6c383296c035450ad44 /application/modules/user/controllers/SessionController.php
parentSession-Controller erstellt (diff)
downloadpbs2-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.php12
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']));