aboutsummaryrefslogtreecommitdiffstats
path: root/mod/network.php
diff options
context:
space:
mode:
authorMike Macgirvin <mike@macgirvin.com>2010-08-11 15:40:18 -0700
committerMike Macgirvin <mike@macgirvin.com>2010-08-11 15:40:18 -0700
commit3d7bb9c37c500c7c2aee2978d982d653f356b1c8 (patch)
tree5ba903f84157e6124a822672a7cb899528186887 /mod/network.php
parentd2c6fa3fa15177990dbc1ae6370f670ed59b3243 (diff)
downloadvolse-hubzilla-3d7bb9c37c500c7c2aee2978d982d653f356b1c8.tar.gz
volse-hubzilla-3d7bb9c37c500c7c2aee2978d982d653f356b1c8.tar.bz2
volse-hubzilla-3d7bb9c37c500c7c2aee2978d982d653f356b1c8.zip
network groups now filtered by parent in group
Diffstat (limited to 'mod/network.php')
-rw-r--r--mod/network.php10
1 files changed, 4 insertions, 6 deletions
diff --git a/mod/network.php b/mod/network.php
index 59f826fd9..4970f69f0 100644
--- a/mod/network.php
+++ b/mod/network.php
@@ -65,10 +65,6 @@ function network_content(&$a, $update = false) {
// that belongs to you, hence you can see all of it. We will filter by group if
// desired.
- // TODO: Perhaps we should limit the group filter to those with the group in the ACL,
- // rather than just the contact-id of the post.
- // Otherwise we're not showing complete conversations, unless all the conversants
- // happen to be in the group.
$sql_extra = '';
@@ -78,14 +74,16 @@ function network_content(&$a, $update = false) {
intval($_SESSION['uid'])
);
if(! count($r)) {
- notice("No such group");
+ notice( t('No such group') . EOL );
goaway($a->get_baseurl() . '/network');
return; // NOTREACHED
}
$contacts = expand_groups(array($group));
- $contacts[] = $_SESSION['cid'];
$contact_str = implode(',',$contacts);
+ $sql_extra = dbesc(" AND `item`.`parent` IN
+ ( SELECT `parent` FROM `item` WHERE `id` = `parent` AND `contact-id` IN ( $contact_str )) ");
+
$sql_extra = dbesc(" AND `contact`.`id` IN ( $contact_str ) ");
$o = '<h4>' . t('Group: ') . $r[0]['name'] . '</h4>' . $o;