From 2a78a4db14fe762742405c0a3fa9b417f65b9aaa Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 4 Feb 2018 20:44:08 +0000 Subject: [PATCH 1/2] Only show posts in the search --- mod/search.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mod/search.php b/mod/search.php index c1990bf870..e016ede74a 100644 --- a/mod/search.php +++ b/mod/search.php @@ -200,11 +200,12 @@ function search_content(App $a) { $r = q("SELECT %s FROM `term` STRAIGHT_JOIN `item` ON `item`.`id`=`term`.`oid` %s - WHERE %s AND (`term`.`uid` = 0 OR (`term`.`uid` = %d AND NOT `term`.`global`)) AND `term`.`otype` = %d AND `term`.`type` = %d AND `term`.`term` = '%s' + WHERE %s AND (`term`.`uid` = 0 OR (`term`.`uid` = %d AND NOT `term`.`global`)) + AND `term`.`otype` = %d AND `term`.`type` = %d AND `term`.`term` = '%s' and `item`.`verb` = '%s' ORDER BY term.created DESC LIMIT %d , %d ", item_fieldlists(), item_joins(), item_condition(), intval(local_user()), - intval(TERM_OBJ_POST), intval(TERM_HASHTAG), dbesc(protect_sprintf($search)), + intval(TERM_OBJ_POST), intval(TERM_HASHTAG), dbesc(protect_sprintf($search)), dbesc(ACTIVITY_POST), intval($a->pager['start']), intval($a->pager['itemspage'])); } else { logger("Start fulltext search for '".$search."'", LOGGER_DEBUG); From 6cd72690c71a12cdb2eb946aa92b2baf698837d9 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 5 Feb 2018 16:58:58 +0000 Subject: [PATCH 2/2] capitulated ... eh, capitalized :-) --- mod/search.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/search.php b/mod/search.php index e016ede74a..fe290ee6d8 100644 --- a/mod/search.php +++ b/mod/search.php @@ -201,7 +201,7 @@ function search_content(App $a) { FROM `term` STRAIGHT_JOIN `item` ON `item`.`id`=`term`.`oid` %s WHERE %s AND (`term`.`uid` = 0 OR (`term`.`uid` = %d AND NOT `term`.`global`)) - AND `term`.`otype` = %d AND `term`.`type` = %d AND `term`.`term` = '%s' and `item`.`verb` = '%s' + AND `term`.`otype` = %d AND `term`.`type` = %d AND `term`.`term` = '%s' AND `item`.`verb` = '%s' ORDER BY term.created DESC LIMIT %d , %d ", item_fieldlists(), item_joins(), item_condition(), intval(local_user()),