diff --git a/application/controllers/components/SearchBar.php b/application/controllers/components/SearchBar.php index 09a49e163..dd3c22690 100644 --- a/application/controllers/components/SearchBar.php +++ b/application/controllers/components/SearchBar.php @@ -17,6 +17,9 @@ class SearchBar extends FHC_Controller { parent::__construct(); + // Loads the AuthLib and starts the authentication + $this->load->library('AuthLib'); + // Load the library SearchBarLib $this->load->library('SearchBarLib'); } diff --git a/vilesci/stammdaten/benutzerberechtigung_autocomplete.php b/vilesci/stammdaten/benutzerberechtigung_autocomplete.php index 774828c19..f963da2d9 100644 --- a/vilesci/stammdaten/benutzerberechtigung_autocomplete.php +++ b/vilesci/stammdaten/benutzerberechtigung_autocomplete.php @@ -36,9 +36,9 @@ if (isset($_REQUEST['autocomplete']) && $_REQUEST['autocomplete'] == 'benutzer') $search = trim((isset($_REQUEST['term']) ? $_REQUEST['term'] : '')); if (is_null($search) || $search == '') exit(); - + $benutzer = new benutzer(); - + if ($benutzer->search(array( $search ))) @@ -61,9 +61,9 @@ if (isset($_REQUEST['autocomplete']) && $_REQUEST['autocomplete'] == 'berechtigu $search = trim((isset($_REQUEST['term']) ? $_REQUEST['term'] : '')); if (is_null($search) || $search == '') exit(); - + $berechtigung = new berechtigung(); - + if ($berechtigung->searchBerechtigungen($search)) { $result_obj = array(); @@ -107,9 +107,9 @@ if (isset($_REQUEST['autocomplete']) && $_REQUEST['autocomplete'] == 'oe_kurzbz' } } - usort($resultArray, function($a, $b) + uasort($resultArray, function($a, $b) { - return $a['organisationseinheittyp_kurzbz'] <=> $b['organisationseinheittyp_kurzbz']; + return $a['organisationseinheittyp_kurzbz'].$a['bezeichnung'] <=> $b['organisationseinheittyp_kurzbz'].$b['bezeichnung']; }); $result_obj = array();