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:
Michael Kaufmann
2022-04-03 18:42:49 +02:00
parent 07049909ef
commit 7779ec376a
11 changed files with 123 additions and 45 deletions

View File

@@ -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))