aboutsummaryrefslogtreecommitdiffstats
path: root/include/acl_selectors.php
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-05-05 18:19:20 -0700
committerredmatrix <git@macgirvin.com>2016-05-05 18:19:20 -0700
commit5508feb6ce185d4da12adbd38dc2c0e36d244704 (patch)
tree58b0d5030c85410f3d962baff033aad1ad239fe7 /include/acl_selectors.php
parent2e3da0cbbbb753c8910e96a907cd031e5d95f7c2 (diff)
parentf38c8e5eca119266ee7f4fb7b6fbfd19c1ac747e (diff)
downloadvolse-hubzilla-5508feb6ce185d4da12adbd38dc2c0e36d244704.tar.gz
volse-hubzilla-5508feb6ce185d4da12adbd38dc2c0e36d244704.tar.bz2
volse-hubzilla-5508feb6ce185d4da12adbd38dc2c0e36d244704.zip
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
Diffstat (limited to 'include/acl_selectors.php')
-rw-r--r--include/acl_selectors.php37
1 files changed, 32 insertions, 5 deletions
diff --git a/include/acl_selectors.php b/include/acl_selectors.php
index 584a70142..4cc01d15b 100644
--- a/include/acl_selectors.php
+++ b/include/acl_selectors.php
@@ -213,14 +213,14 @@ function fixacl(&$item) {
/**
* Builds a modal dialog for editing permissions, using acl_selector.tpl as the template.
*
-* @param array $default Optional access control list for the initial state of the dialog.
+* @param array $default Optional access control list for the initial state of the dialog.
* @param boolean $show_jotnets Whether plugins for federated networks should be included in the permissions dialog
-* @param string $showall_caption An optional caption to describe the scope of an unrestricted post. e.g. "Public"
-* @param string $dialog_description Optional message to include at the top of the dialog. E.g. "Warning: Post permissions cannot be changed once sent".
-* @param string $context_help Allows the dialog to present a help icon. E.g. "acl_dialog_post"
+* @param string $showall_caption An optional caption to describe the scope of an unrestricted post. e.g. "Public"
+* @param string $dialog_description Optional message to include at the top of the dialog. E.g. "Warning: Post permissions cannot be changed once sent".
+* @param string $context_help Allows the dialog to present a help icon. E.g. "acl_dialog_post"
* @param boolean $readonly Not implemented yet. When implemented, the dialog will use acl_readonly.tpl instead, so that permissions may be viewed for posts that can no longer have their permissions changed.
*
-* @return string html modal dialog build from acl_selector.tpl
+* @return string html modal dialog built from acl_selector.tpl
*/
function populate_acl($defaults = null,$show_jotnets = true, $showall_caption = '', $dialog_description = '', $context_help = '', $readonly = false) {
@@ -273,3 +273,30 @@ function populate_acl($defaults = null,$show_jotnets = true, $showall_caption =
}
+/**
+* Returns a string that's suitable for passing as the $dialog_description argument to a
+* populate_acl() call for wall posts or network posts.
+*
+* This string is needed in 3 different files, and our .po translation system currently
+* cannot be used as a string table (because the value is always the key is english) so
+* I've centralized the value here (making this function name the "key") until we have a
+* better way.
+*
+* @return string Description to present to user in modal permissions dialog
+*/
+function get_post_aclDialogDescription() {
+
+ // I'm trying to make two points in this description text - warn about finality of wall
+ // post permissions, and try to clear up confusion that these permissions set who is
+ // *shown* the post, istead of who is able to see the post, i.e. make it clear that clicking
+ // the "Show" button on a group does not post it to the feed of people in that group, it
+ // mearly allows those people to view the post if they are viewing/following this channel.
+ $description = t('Post permissions %s cannot be changed %s after a post is shared.</br />These permissions set who is allowed to view the post.');
+
+ // Lets keep the emphasis styling seperate from the translation. It may change.
+ $emphasisOpen = '<b><a href="' . z_root() . '/help/acl_dialog_post" target="hubzilla-help">';
+ $emphasisClose = '</a></b>';
+
+ return sprintf($description, $emphasisOpen, $emphasisClose);
+}
+