remove unused lib/version.inc.php file; added module-specific search to global-search; added new table for user-column-settings
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -77,10 +77,17 @@ class GlobalSearch
|
||||
$processed = [];
|
||||
|
||||
$stparts = explode(" ", $searchtext);
|
||||
$module = "";
|
||||
|
||||
foreach ($stparts as $searchtext) {
|
||||
|
||||
$searchtext = trim($searchtext);
|
||||
|
||||
if (preg_match('/^([a-z]+):$/', $searchtext, $matches)) {
|
||||
$module = $matches[1];
|
||||
continue;
|
||||
}
|
||||
|
||||
// admin
|
||||
if (isset($userinfo['adminsession']) && $userinfo['adminsession'] == 1) {
|
||||
|
||||
@@ -262,6 +269,12 @@ class GlobalSearch
|
||||
];
|
||||
}
|
||||
|
||||
// module specific search
|
||||
if (!empty($module)) {
|
||||
$modSearch = $toSearch[$module] ?? [];
|
||||
$toSearch = [$module => $modSearch];
|
||||
}
|
||||
|
||||
foreach ($toSearch as $entity => $edata) {
|
||||
|
||||
$collection = (new Collection($edata['class'], $userinfo))
|
||||
|
||||
Reference in New Issue
Block a user