aboutsummaryrefslogtreecommitdiffstats
path: root/include/acl_selectors.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-02-09 19:39:49 -0800
committerFriendika <info@friendika.com>2011-02-09 19:39:49 -0800
commitde2c9531db2332f0c0e944add6f9d85e88476dff (patch)
tree993520ba3ab11c44121b5040f6cd4551b5eacbff /include/acl_selectors.php
parent05c52ae81da6ce3c3b57672c2560072e1ce2705c (diff)
downloadvolse-hubzilla-de2c9531db2332f0c0e944add6f9d85e88476dff.tar.gz
volse-hubzilla-de2c9531db2332f0c0e944add6f9d85e88476dff.tar.bz2
volse-hubzilla-de2c9531db2332f0c0e944add6f9d85e88476dff.zip
post permission hooks
Diffstat (limited to 'include/acl_selectors.php')
-rw-r--r--include/acl_selectors.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/acl_selectors.php b/include/acl_selectors.php
index 269dc3e34..953243a43 100644
--- a/include/acl_selectors.php
+++ b/include/acl_selectors.php
@@ -3,6 +3,8 @@
function group_select($selname,$selclass,$preselected = false,$size = 4) {
+ $a = get_app();
+
$o = '';
$o .= "<select name=\"{$selname}[]\" id=\"$selclass\" class=\"$selclass\" multiple=\"multiple\" size=\"$size\" >\r\n";
@@ -11,6 +13,13 @@ function group_select($selname,$selclass,$preselected = false,$size = 4) {
$_SESSION['uid']
);
+
+ $arr = array('group' => $r, 'entry' => $o);
+
+ // e.g. 'network_pre_group_deny', 'profile_pre_group_allow'
+
+ call_hooks($a->module . '_pre_' . $selname, $arr);
+
if(count($r)) {
foreach($r as $rr) {
if((is_array($preselected)) && in_array($rr['id'], $preselected))
@@ -25,6 +34,8 @@ function group_select($selname,$selclass,$preselected = false,$size = 4) {
}
$o .= "</select>\r\n";
+ call_hooks($a->module . '_post_' . $selname, $o);
+
return $o;
}
@@ -60,6 +71,15 @@ function contact_select($selname, $selclass, $preselected = false, $size = 4, $p
intval(local_user())
);
+
+ $arr = array('contact' => $r, 'entry' => $o);
+
+ // e.g. 'network_pre_contact_deny', 'profile_pre_contact_allow'
+
+ call_hooks($a->module . '_pre_' . $selname, $arr);
+
+
+
if(count($r)) {
foreach($r as $rr) {
if((is_array($preselected)) && in_array($rr['id'], $preselected))
@@ -73,8 +93,10 @@ function contact_select($selname, $selclass, $preselected = false, $size = 4, $p
}
}
+
$o .= "</select>\r\n";
+ call_hooks($a->module . '_post_' . $selname, $o);
return $o;
}