X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fnetwork.php;h=ab44073508c572dba438a74b753a8944f7e7a5eb;hb=dd511ac70a5cccd1c2cca188c61990c7078dda09;hp=e10e7b78805e46b860a1791e1cf7a46913fd1a4e;hpb=a03014a47c69e9bbda2cdc991bc7b49481bdbe7d;p=friendica.git diff --git a/mod/network.php b/mod/network.php index e10e7b7880..ab44073508 100644 --- a/mod/network.php +++ b/mod/network.php @@ -531,9 +531,10 @@ die("ss"); info( t('Group is empty')); } - $sql_post_table = " INNER JOIN (SELECT DISTINCT(`parent`) FROM `item` WHERE (`contact-id` IN ($contact_str) OR `allow_gid` like '".protect_sprintf('%<'.intval($group).'>%')."') and deleted = 0 ORDER BY `created` DESC) AS `temp1` ON $sql_table.$sql_parent = `temp1`.`parent` "; + //$sql_post_table = " INNER JOIN (SELECT DISTINCT(`parent`) FROM `item` WHERE (`contact-id` IN ($contact_str) OR `allow_gid` like '".protect_sprintf('%<'.intval($group).'>%')."') and deleted = 0 ORDER BY `created` DESC) AS `temp1` ON $sql_table.$sql_parent = `temp1`.`parent` "; - $sql_extra3 .= " AND `contact-id` IN ($contact_str.$contact_str_self) "; + $sql_extra3 .= " AND `contact-id` IN ($contact_str$contact_str_self) "; + $sql_extra3 .= " AND EXISTS (SELECT id FROM `item` WHERE (`contact-id` IN ($contact_str) OR `allow_gid` like '".protect_sprintf('%<'.intval($group).'>%')."') and deleted = 0 AND parent = $sql_table.$sql_parent) "; $o = '

' . t('Group: ') . $r[0]['name'] . '

' . $o; } elseif($cid) { @@ -709,7 +710,7 @@ die("ss"); ); } else { $r = q("SELECT `thread`.`iid` AS `item_id`, `thread`.`network` AS `item_network`, `contact`.`uid` AS `contact_uid` - FROM $sql_table $sql_post_table INNER JOIN `contact` ON `contact`.`id` = `thread`.`contact-id` + FROM $sql_table $sql_post_table STRAIGHT_JOIN `contact` ON `contact`.`id` = `thread`.`contact-id` AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0 WHERE `thread`.`uid` = %d AND `thread`.`visible` = 1 AND `thread`.`deleted` = 0 AND `thread`.`moderated` = 0 @@ -737,7 +738,7 @@ die("ss"); // This problem can occur expecially with imported facebook posts $max_comments = get_config("system", "max_comments"); if ($max_comments == 0) - $max_comments = 1000; + $max_comments = 100; $items = array();