mirror of
https://bitbucket.org/jsuto/piler.git
synced 2025-06-13 01:37:02 +02:00
added search capabilities to admin sections
This commit is contained in:
@ -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']) ) {
|
||||
|
Reference in New Issue
Block a user