Each searchbar it's own config

This commit is contained in:
chfhtw
2025-07-29 16:52:29 +02:00
parent 30b895ad04
commit 1005963179
8 changed files with 90 additions and 34 deletions
+10 -2
View File
@@ -40,17 +40,25 @@ class SearchLib
/**
* Gets the CI instance and loads model
*
* @param array $params
* @return void
*/
public function __construct()
public function __construct($params = null)
{
$this->_ci =& get_instance(); // get code igniter instance
$config = $params['config'] ?? null;
// It is loaded only to have the DB functions available
$this->_ci->load->model('person/Benutzer_model', 'BenutzerModel');
// Load Config
$this->_ci->load->config('search', true);
$this->_ci->load->config('search', true, (boolean)$config);
$this->_ci->load->config('searchfunctions', true);
if ($config) {
$this->_ci->load->config($config, true);
$this->_ci->config->set_item('search', $this->_ci->config->item($config));
}
$this->_ci->load->library('PhrasesLib', [['search'], null], 'search_phrases');