diff options
author | Paolo Tacconi <p.tacconi@giunti.it> | 2016-04-15 09:22:27 +0200 |
---|---|---|
committer | Paolo Tacconi <p.tacconi@giunti.it> | 2016-04-15 09:22:27 +0200 |
commit | c38c79d71c8ef70ef649f83e322f1984b75ee2dd (patch) | |
tree | 958fcd22f04546f40b6ac68bb58cfe1a1b1fb7f6 /include/acl_selectors.php | |
parent | 1806da0851dd5cf5978b19d12783ae3101a11257 (diff) | |
parent | 45a854762b451dafb882bc56efce054b64420627 (diff) | |
download | volse-hubzilla-c38c79d71c8ef70ef649f83e322f1984b75ee2dd.tar.gz volse-hubzilla-c38c79d71c8ef70ef649f83e322f1984b75ee2dd.tar.bz2 volse-hubzilla-c38c79d71c8ef70ef649f83e322f1984b75ee2dd.zip |
Merge branch 'redmatrix-master'
Diffstat (limited to 'include/acl_selectors.php')
-rw-r--r-- | include/acl_selectors.php | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/include/acl_selectors.php b/include/acl_selectors.php index 4d44ec12e..92f9436a2 100644 --- a/include/acl_selectors.php +++ b/include/acl_selectors.php @@ -23,7 +23,7 @@ function group_select($selname,$selclass,$preselected = false,$size = 4) { // e.g. 'network_pre_group_deny', 'profile_pre_group_allow' - call_hooks($a->module . '_pre_' . $selname, $arr); + call_hooks(App::$module . '_pre_' . $selname, $arr); if($r) { foreach($r as $rr) { @@ -39,7 +39,7 @@ function group_select($selname,$selclass,$preselected = false,$size = 4) { } $o .= "</select>\r\n"; - call_hooks($a->module . '_post_' . $selname, $o); + call_hooks(App::$module . '_post_' . $selname, $o); return $o; @@ -127,7 +127,7 @@ function contact_selector($selname, $selclass, $preselected = false, $options) { // e.g. 'network_pre_contact_deny', 'profile_pre_contact_allow' - call_hooks($a->module . '_pre_' . $selname, $arr); + call_hooks(App::$module . '_pre_' . $selname, $arr); if(count($r)) { foreach($r as $rr) { @@ -145,7 +145,7 @@ function contact_selector($selname, $selclass, $preselected = false, $options) { $o .= "</select>\r\n"; - call_hooks($a->module . '_post_' . $selname, $o); + call_hooks(App::$module . '_post_' . $selname, $o); return $o; }*/ @@ -182,7 +182,7 @@ function contact_select($selname, $selclass, $preselected = false, $size = 4, $p // e.g. 'network_pre_contact_deny', 'profile_pre_contact_allow' - call_hooks($a->module . '_pre_' . $selname, $arr); + call_hooks(App::$module . '_pre_' . $selname, $arr); if($r) { foreach($r as $rr) { @@ -200,7 +200,7 @@ function contact_select($selname, $selclass, $preselected = false, $size = 4, $p $o .= "</select>\r\n"; - call_hooks($a->module . '_post_' . $selname, $o); + call_hooks(App::$module . '_post_' . $selname, $o); return $o; } @@ -210,10 +210,13 @@ function fixacl(&$item) { $item = str_replace(array('<','>'),array('',''),$item); } -function populate_acl($defaults = null,$show_jotnets = true) { +function populate_acl($defaults = null,$show_jotnets = true, $showall = '') { $allow_cid = $allow_gid = $deny_cid = $deny_gid = false; + if(! $showall) + $showall = t('Visible to your default audience'); + if(is_array($defaults)) { $allow_cid = ((strlen($defaults['allow_cid'])) ? explode('><', $defaults['allow_cid']) : array() ); @@ -231,22 +234,21 @@ function populate_acl($defaults = null,$show_jotnets = true) { $jotnets = ''; if($show_jotnets) { -logger('jot_networks'); call_hooks('jot_networks', $jotnets); } $tpl = get_markup_template("acl_selector.tpl"); $o = replace_macros($tpl, array( - '$showall'=> t("Visible to your default audience"), - '$show' => t("Show"), - '$hide' => t("Don't show"), - '$allowcid' => json_encode($allow_cid), - '$allowgid' => json_encode($allow_gid), - '$denycid' => json_encode($deny_cid), - '$denygid' => json_encode($deny_gid), - '$jnetModalTitle' => t('Other networks and post services'), - '$jotnets' => $jotnets, - '$aclModalTitle' => t('Permissions'), + '$showall' => $showall, + '$show' => t("Show"), + '$hide' => t("Don't show"), + '$allowcid' => json_encode($allow_cid), + '$allowgid' => json_encode($allow_gid), + '$denycid' => json_encode($deny_cid), + '$denygid' => json_encode($deny_gid), + '$jnetModalTitle' => t('Other networks and post services'), + '$jotnets' => $jotnets, + '$aclModalTitle' => t('Permissions'), '$aclModalDismiss' => t('Close') )); |