aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-06-23 04:51:27 -0700
committerfriendica <info@friendica.com>2013-06-23 04:51:27 -0700
commitd093981d68477887f5aecbb988bebb451389b79e (patch)
treea05c5d041ca9e685f4a9188d23a85a88dafd6c20 /mod
parentb841f825b5befc1fd03dfe49b3af3f31403c9d97 (diff)
downloadvolse-hubzilla-d093981d68477887f5aecbb988bebb451389b79e.tar.gz
volse-hubzilla-d093981d68477887f5aecbb988bebb451389b79e.tar.bz2
volse-hubzilla-d093981d68477887f5aecbb988bebb451389b79e.zip
another temporary fix to mod/search to only return one of each post.
Diffstat (limited to 'mod')
-rw-r--r--mod/search.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/mod/search.php b/mod/search.php
index 02a845826..1335ea508 100644
--- a/mod/search.php
+++ b/mod/search.php
@@ -189,7 +189,7 @@ function search_content(&$a,$update = 0, $load = false) {
$pager_sql = sprintf(" LIMIT %d, %d ",intval($a->pager['start']), intval($a->pager['itemspage']));
dbg(1);
if($load) {
- $r = q("SELECT distinct(mid), item.* from item
+ $r = q("SELECT distinct mid, id as item_id from item
WHERE item_restrict = 0
AND (( `item`.`allow_cid` = '' AND `item`.`allow_gid` = '' AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = '' AND item_private = 0 )
OR ( `item`.`uid` = %d ))
@@ -209,15 +209,15 @@ dbg(0);
if($r) {
$parents_str = ids_to_querystr($r,'item_id');
-
+dbg(1);
$items = q("SELECT `item`.*, `item`.`id` AS `item_id`
FROM `item`
WHERE item_restrict = 0
- $sql_extra ",
- intval($a->profile['profile_uid']),
- dbesc($parents_str)
+ $sql_extra and parent in ( $parents_str ) "
+// intval($a->profile['profile_uid']),
+// dbesc($parents_str)
);
-
+dbg(0);
xchan_query($items);
$items = fetch_post_tags($items,true);
$items = conv_sort($items,'created');