]> git.mxchange.org Git - friendica.git/blobdiff - mod/network.php
The "display" page now shows the current author profile with a "connect" link (if...
[friendica.git] / mod / network.php
index e10e7b78805e46b860a1791e1cf7a46913fd1a4e..ab44073508c572dba438a74b753a8944f7e7a5eb 100644 (file)
@@ -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 = '<h2>' . t('Group: ') . $r[0]['name'] . '</h2>' . $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();