]> git.mxchange.org Git - friendica.git/commitdiff
Only show posts in the search
authorMichael <heluecht@pirati.ca>
Sun, 4 Feb 2018 20:44:08 +0000 (20:44 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 4 Feb 2018 20:44:08 +0000 (20:44 +0000)
mod/search.php

index c1990bf8708ba1d9a9d5148264f34d87ea9c9a79..e016ede74ac311da2d68c18e8148f90be883de90 100644 (file)
@@ -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);