diff options
author | friendica <info@friendica.com> | 2013-05-19 17:57:06 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-05-19 17:57:06 -0700 |
commit | f9fec7cf8f328f44a5550d50029ad115311eb45a (patch) | |
tree | 01daa1ab29ea36c85c214d6767cab76ebd4e560e | |
parent | 3e64208f481bf60ef74202d6cc6f899e55c74340 (diff) | |
download | volse-hubzilla-f9fec7cf8f328f44a5550d50029ad115311eb45a.tar.gz volse-hubzilla-f9fec7cf8f328f44a5550d50029ad115311eb45a.tar.bz2 volse-hubzilla-f9fec7cf8f328f44a5550d50029ad115311eb45a.zip |
issue with auto permissions
-rw-r--r-- | mod/connections.php | 10 | ||||
-rw-r--r-- | mod/editpost.php | 2 | ||||
-rw-r--r-- | version.inc | 2 |
3 files changed, 11 insertions, 3 deletions
diff --git a/mod/connections.php b/mod/connections.php index 2f49ee374..507a587ba 100644 --- a/mod/connections.php +++ b/mod/connections.php @@ -350,7 +350,15 @@ function connections_content(&$a) { $unapproved = array('pending', t('Approve this connection'), '', t('Accept connection to allow communication')); foreach($global_perms as $k => $v) { - $perms[] = array('perms_' . $k, $v[3], (($contact['abook_their_perms'] & $v[1]) ? "1" : ""),((($contact['abook_my_perms'] & $v[1]) || $existing[$k]) ? "1" : ""), $v[1], (($channel[$v[0]] == PERMS_SPECIFIC) ? '' : '1'), $v[4]); + $thisperm = (($contact['abook_my_perms'] & $v[1]) ? "1" : ''); + + // For auto permissions (when $self is true) we don't want to look at existing + // permissions because they are enabled for the channel owner + + if((! $self) && ($existing[$k])) + $thisperm = "1"; + + $perms[] = array('perms_' . $k, $v[3], (($contact['abook_their_perms'] & $v[1]) ? "1" : ""),$thisperm, $v[1], (($channel[$v[0]] == PERMS_SPECIFIC) ? '' : '1'), $v[4]); } $o .= replace_macros($tpl,array( diff --git a/mod/editpost.php b/mod/editpost.php index 1d7b7b6fb..b28e58348 100644 --- a/mod/editpost.php +++ b/mod/editpost.php @@ -83,7 +83,7 @@ function editpost_content(&$a) { '$pvisit' => 'none', '$public' => t('Public post'), '$jotnets' => $jotnets, - '$title' => $itm[0]['title'], + '$title' => htmlspecialchars($itm[0]['title']), '$placeholdertitle' => t('Set title'), '$category' => file_tag_file_to_list($itm[0]['file'], 'category'), '$placeholdercategory' => t('Categories (comma-separated list)'), diff --git a/version.inc b/version.inc index 96ee37fd3..f91c07de4 100644 --- a/version.inc +++ b/version.inc @@ -1 +1 @@ -2013-05-18.317 +2013-05-19.318 |