diff --git a/include/acl_selectors.php b/include/acl_selectors.php index 269dc3e349..953243a437 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 .= "\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 .= "\r\n"; + call_hooks($a->module . '_post_' . $selname, $o); return $o; } diff --git a/mod/item.php b/mod/item.php index 737fe83419..a83373f59a 100644 --- a/mod/item.php +++ b/mod/item.php @@ -22,6 +22,8 @@ function item_post(&$a) { $uid = local_user(); + call_hooks('post_local_start', $_POST); + $parent = ((x($_POST,'parent')) ? intval($_POST['parent']) : 0); $parent_item = null;