aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorMike Macgirvin <mike@macgirvin.com>2010-09-17 03:43:03 -0700
committerMike Macgirvin <mike@macgirvin.com>2010-09-17 03:43:03 -0700
commit4eb1c1eb1a9d830151aa6437fefb4e7a590064e8 (patch)
treedd4afea97334f63ba1c3801a5dc7da7289f64b5a /mod
parenta50947a4bc3f779df8fa4e6777bc025fcefc8d21 (diff)
downloadvolse-hubzilla-4eb1c1eb1a9d830151aa6437fefb4e7a590064e8.tar.gz
volse-hubzilla-4eb1c1eb1a9d830151aa6437fefb4e7a590064e8.tar.bz2
volse-hubzilla-4eb1c1eb1a9d830151aa6437fefb4e7a590064e8.zip
our implementation of "aspects" functionally complete
Diffstat (limited to 'mod')
-rw-r--r--mod/network.php15
-rw-r--r--mod/profile.php1
2 files changed, 12 insertions, 4 deletions
diff --git a/mod/network.php b/mod/network.php
index 7eb93f435..afe44dabf 100644
--- a/mod/network.php
+++ b/mod/network.php
@@ -20,9 +20,10 @@ function network_content(&$a, $update = false) {
if(! $update) {
// pull out the group here because the updater might have different args
- if($a->argc > 1)
+ if($a->argc > 1) {
$group = intval($a->argv[1]);
-
+ $group_acl = array('allow_gid' => '<' . $group . '>');
+ }
$_SESSION['return_url'] = $a->cmd;
$tpl = file_get_contents('view/jot-header.tpl');
@@ -32,14 +33,20 @@ function network_content(&$a, $update = false) {
require_once('view/acl_selectors.php');
$tpl = file_get_contents("view/jot.tpl");
+
+ if(($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'])))))
+ $lockstate = 'lock';
+ else
+ $lockstate = 'unlock';
$o .= replace_macros($tpl,array(
'$return_path' => $a->cmd,
'$baseurl' => $a->get_baseurl(),
'$defloc' => $a->user['default-location'],
'$visitor' => 'block',
- '$lockstate' => 'unlock',
- '$acl' => populate_acl($a->user),
+ '$lockstate' => $lockstate,
+ '$acl' => populate_acl(($group) ? $group_acl : $a->user),
+ '$bang' => (($group) ? '!' : ''),
'$profile_uid' => $_SESSION['uid']
));
diff --git a/mod/profile.php b/mod/profile.php
index 18201e821..5efb28ea7 100644
--- a/mod/profile.php
+++ b/mod/profile.php
@@ -144,6 +144,7 @@ function profile_content(&$a, $update = false) {
'$return_path' => $a->cmd,
'$visitor' => (($_SESSION['uid'] == $a->profile['profile_uid']) ? 'block' : 'none'),
'$lockstate' => $lockstate,
+ '$bang' => '',
'$acl' => (($_SESSION['uid'] == $a->profile['profile_uid']) ? populate_acl($a->user) : ''),
'$profile_uid' => $a->profile['profile_uid']
));