]> git.mxchange.org Git - friendica.git/commitdiff
tweaking sql for netwrk page
authorMike Macgirvin <mike@macgirvin.com>
Fri, 13 Aug 2010 12:47:16 +0000 (05:47 -0700)
committerMike Macgirvin <mike@macgirvin.com>
Fri, 13 Aug 2010 12:47:16 +0000 (05:47 -0700)
mod/network.php

index 1a68304e8b8b493b1466bb37a14088bba8af2585..b005e8cf36eed6a187a2f063b4e0f0cb81d293f6 100644 (file)
@@ -65,8 +65,7 @@ function network_content(&$a, $update = false) {
        // that belongs to you, hence you can see all of it. We will filter by group if
        // desired. 
 
-
-       $sql_extra = ''; 
+       $sql_extra = " AND `item`.`parent` IN ( SELECT `parent` FROM `item` WHERE `id` = `parent` AND `type` IN ('wall', 'photo', 'remote' )) ";
 
        if($group) {
                $r = q("SELECT `name`, `id` FROM `group` WHERE `id` = %d AND `uid` = %d LIMIT 1",
@@ -81,7 +80,7 @@ function network_content(&$a, $update = false) {
 
                $contacts = expand_groups(array($group));
                $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 `item`.`parent` IN ( SELECT `parent` FROM `item` WHERE `id` = `parent` AND `type` IN ('wall', 'photo', 'remote') AND `contact-id` IN ( $contact_str )) ");
  
                 $o = '<h4>' . t('Group: ') . $r[0]['name'] . '</h4>' . $o;