mirror of
https://github.com/friendica/friendica
synced 2024-11-10 06:22:53 +00:00
tweaking sql for netwrk page
This commit is contained in:
parent
e79cb38217
commit
485708bd9a
1 changed files with 2 additions and 3 deletions
|
@ -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
|
// that belongs to you, hence you can see all of it. We will filter by group if
|
||||||
// desired.
|
// desired.
|
||||||
|
|
||||||
|
$sql_extra = " AND `item`.`parent` IN ( SELECT `parent` FROM `item` WHERE `id` = `parent` AND `type` IN ('wall', 'photo', 'remote' )) ";
|
||||||
$sql_extra = '';
|
|
||||||
|
|
||||||
if($group) {
|
if($group) {
|
||||||
$r = q("SELECT `name`, `id` FROM `group` WHERE `id` = %d AND `uid` = %d LIMIT 1",
|
$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));
|
$contacts = expand_groups(array($group));
|
||||||
$contact_str = implode(',',$contacts);
|
$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;
|
$o = '<h4>' . t('Group: ') . $r[0]['name'] . '</h4>' . $o;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue