Fix Issue 5252
This commit is contained in:
parent
81ac7c33da
commit
5743bb0dae
1 changed files with 9 additions and 6 deletions
|
@ -21,7 +21,7 @@ function search_saved_searches() {
|
||||||
$o = '';
|
$o = '';
|
||||||
$search = ((x($_GET,'search')) ? notags(trim(rawurldecode($_GET['search']))) : '');
|
$search = ((x($_GET,'search')) ? notags(trim(rawurldecode($_GET['search']))) : '');
|
||||||
|
|
||||||
if (! Feature::isEnabled(local_user(),'savedsearch'))
|
if (!Feature::isEnabled(local_user(),'savedsearch'))
|
||||||
return $o;
|
return $o;
|
||||||
|
|
||||||
$r = q("SELECT `id`,`term` FROM `search` WHERE `uid` = %d",
|
$r = q("SELECT `id`,`term` FROM `search` WHERE `uid` = %d",
|
||||||
|
@ -184,7 +184,7 @@ function search_content(App $a) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $search)
|
if (!$search)
|
||||||
return $o;
|
return $o;
|
||||||
|
|
||||||
if (Config::get('system','only_tag_search'))
|
if (Config::get('system','only_tag_search'))
|
||||||
|
@ -211,9 +211,13 @@ function search_content(App $a) {
|
||||||
}
|
}
|
||||||
dba::close($terms);
|
dba::close($terms);
|
||||||
|
|
||||||
|
if (!empty($itemids)) {
|
||||||
$params = ['order' => ['id' => true]];
|
$params = ['order' => ['id' => true]];
|
||||||
$items = Item::selectForUser(local_user(), [], ['id' => $itemids], $params);
|
$items = Item::selectForUser(local_user(), [], ['id' => $itemids], $params);
|
||||||
$r = dba::inArray($items);
|
$r = dba::inArray($items);
|
||||||
|
} else {
|
||||||
|
$r = [];
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
logger("Start fulltext search for '".$search."'", LOGGER_DEBUG);
|
logger("Start fulltext search for '".$search."'", LOGGER_DEBUG);
|
||||||
|
|
||||||
|
@ -251,4 +255,3 @@ function search_content(App $a) {
|
||||||
|
|
||||||
return $o;
|
return $o;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue