aboutsummaryrefslogtreecommitdiffstats
path: root/mod/network.php
diff options
context:
space:
mode:
authorSimon L'nu <simon.lnu@gmail.com>2012-03-24 19:38:54 -0400
committerSimon L'nu <simon.lnu@gmail.com>2012-03-24 19:38:54 -0400
commit8a6c407282fe10f676f08f21e28647a5c8794e11 (patch)
treeb5a5bc5881bf5b35cdb52bb997498ef36a391720 /mod/network.php
parent803f79e0912c4a526a16fdda4809277d8ad3195d (diff)
parent3ae43c24487450a749942ef4c3c19fa2a61461b6 (diff)
downloadvolse-hubzilla-8a6c407282fe10f676f08f21e28647a5c8794e11.tar.gz
volse-hubzilla-8a6c407282fe10f676f08f21e28647a5c8794e11.tar.bz2
volse-hubzilla-8a6c407282fe10f676f08f21e28647a5c8794e11.zip
Merge branch 'master', remote-tracking branch 'remotes/upstream/master'
* remotes/upstream/master: prevent duplicate friend suggestions block filed items from deletion add the bang network filter is now a permission group small fix in css add right_aside to diabook-blue add connectable services to right_aside add PostIt to right_aside, fixes in css * master:
Diffstat (limited to 'mod/network.php')
-rwxr-xr-xmod/network.php20
1 files changed, 17 insertions, 3 deletions
diff --git a/mod/network.php b/mod/network.php
index 9ec8c23b5..5ca0a8c7d 100755
--- a/mod/network.php
+++ b/mod/network.php
@@ -250,6 +250,20 @@ function network_content(&$a, $update = 0) {
if($cid)
$def_acl = array('allow_cid' => '<' . intval($cid) . '>');
+ if($nets) {
+ $r = q("select id from contact where uid = %d and network = '%s' and self = 0",
+ intval(local_user()),
+ dbesc($nets)
+ );
+
+ $str = '';
+ if(count($r))
+ foreach($r as $rr)
+ $str .= '<' . $rr['id'] . '>';
+ if(strlen($str))
+ $def_acl = array('allow_cid' => $str);
+ }
+
if(! $update) {
if($group) {
if(($t = group_public_members($group)) && (! get_pconfig(local_user(),'system','nowarn_insecure'))) {
@@ -269,9 +283,9 @@ function network_content(&$a, $update = 0) {
'allow_location' => $a->user['allow_location'],
'default_location' => $a->user['default-location'],
'nickname' => $a->user['nickname'],
- 'lockstate' => ((($group) || (is_array($a->user) && ((strlen($a->user['allow_cid'])) || (strlen($a->user['allow_gid'])) || (strlen($a->user['deny_cid'])) || (strlen($a->user['deny_gid']))))) ? 'lock' : 'unlock'),
- 'acl' => populate_acl((($group || $cid) ? $def_acl : $a->user), $celeb),
- 'bang' => (($group || $cid) ? '!' : ''),
+ 'lockstate' => ((($group) || ($cid) || ($nets) || (is_array($a->user) && ((strlen($a->user['allow_cid'])) || (strlen($a->user['allow_gid'])) || (strlen($a->user['deny_cid'])) || (strlen($a->user['deny_gid']))))) ? 'lock' : 'unlock'),
+ 'acl' => populate_acl((($group || $cid || $nets) ? $def_acl : $a->user), $celeb),
+ 'bang' => (($group || $cid || $nets) ? '!' : ''),
'visitor' => 'block',
'profile_uid' => local_user()
);