]> git.mxchange.org Git - friendica.git/blobdiff - mod/network.php
fix json_encode on url's
[friendica.git] / mod / network.php
index ae991e6ee7a175aa91c45fe3076e9de2e8a51409..7ad5058bf813f8095a329fdba4a4a54c50e534d8 100644 (file)
@@ -137,7 +137,7 @@ function network_content(&$a, $update = 0) {
                                notice( t('Group is empty'));
                }
 
-               $sql_extra = " AND `item`.`parent` IN ( SELECT `parent` FROM `item` WHERE `id` = `parent` AND `contact-id` IN ( $contact_str )) ";
+               $sql_extra = " AND `item`.`parent` IN ( SELECT `parent` FROM `item` WHERE `id` = `parent` AND ( `contact-id` IN ( $contact_str ) OR `allow_gid` REGEXP '<" . intval($group) . ">' )) ";
                $o = '<h2>' . t('Group: ') . $r[0]['name'] . '</h2>' . $o;
        }
        elseif($cid) {
@@ -164,11 +164,13 @@ function network_content(&$a, $update = 0) {
        if((! $group) && (! $cid) && (! $update))
                $o .= get_birthdays();
 
+       $sql_extra2 = (($nouveau) ? '' : " AND `item`.`parent` = `item`.`id` ");
 
        $r = q("SELECT COUNT(*) AS `total`
                FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
                WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`deleted` = 0
                AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
+               $sql_extra2
                $sql_extra ",
                intval($_SESSION['uid'])
        );