added search capabilities to admin sections

This commit is contained in:
SJ
2013-08-24 13:53:14 +02:00
parent 899d97edfa
commit 1d8dc6a046
24 changed files with 153 additions and 35 deletions

View File

@ -35,6 +35,12 @@ class ControllerLdapList extends Controller {
if(isset($this->request->get['id'])) { $this->data['id'] = $this->request->get['id']; }
$this->data['search'] = '';
if(isset($this->request->post['search'])) { $this->data['search'] = $this->request->post['search']; }
else if(isset($this->request->get['search'])) { $this->data['search'] = $this->request->get['search']; }
/* check if we are admin */
if(Registry::get('admin_user') == 1) {
@ -68,11 +74,10 @@ class ControllerLdapList extends Controller {
}
}
if(isset($this->request->get['id'])) {
if($this->data['id'] != -1) {
$this->data['a'] = $this->model_saas_ldap->get($this->data['id']);
}
else {
$this->data['entries'] = $this->model_saas_ldap->get();
} else {
$this->data['entries'] = $this->model_saas_ldap->search($this->data['search']);
}
if ( isset($this->data['errorstring']) ) {