diff options
author | Marc Alexander <admin@m-a-styles.de> | 2017-12-27 21:27:11 +0100 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2017-12-27 21:27:11 +0100 |
commit | d8f9cb4961a5eef91cc00f6907b711d2e319beba (patch) | |
tree | b1538026e61af276e6e9291b5ff63003f2468a53 | |
parent | 20a6182a8669e3a366665027cf5c5f04a46536c0 (diff) | |
parent | b9254cfda85171a70b6c93c992439ae2f492ef65 (diff) | |
download | forums-d8f9cb4961a5eef91cc00f6907b711d2e319beba.tar forums-d8f9cb4961a5eef91cc00f6907b711d2e319beba.tar.gz forums-d8f9cb4961a5eef91cc00f6907b711d2e319beba.tar.bz2 forums-d8f9cb4961a5eef91cc00f6907b711d2e319beba.tar.xz forums-d8f9cb4961a5eef91cc00f6907b711d2e319beba.zip |
Merge pull request #5041 from kasimi/ticket/15447
[ticket/15447] Add event core.acp_profile_modify_profile_row
-rw-r--r-- | phpBB/includes/acp/acp_profile.php | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/phpBB/includes/acp/acp_profile.php b/phpBB/includes/acp/acp_profile.php index 18dde382ca..d3daf63bd6 100644 --- a/phpBB/includes/acp/acp_profile.php +++ b/phpBB/includes/acp/acp_profile.php @@ -762,7 +762,8 @@ class acp_profile continue; } $profile_field = $this->type_collection[$row['field_type']]; - $template->assign_block_vars('fields', array( + + $field_block = array( 'FIELD_IDENT' => $row['field_ident'], 'FIELD_TYPE' => $profile_field->get_name(), @@ -774,8 +775,26 @@ class acp_profile 'U_MOVE_UP' => $this->u_action . "&action=move_up&field_id=$id" . '&hash=' . generate_link_hash('acp_profile'), 'U_MOVE_DOWN' => $this->u_action . "&action=move_down&field_id=$id" . '&hash=' . generate_link_hash('acp_profile'), - 'S_NEED_EDIT' => $s_need_edit) + 'S_NEED_EDIT' => $s_need_edit, + ); + + /** + * Event to modify profile field data before it is assigned to the template + * + * @event core.acp_profile_modify_profile_row + * @var array row Array with data for the current profile field + * @var array field_block Template data that is being assigned to the 'fields' block + * @var object profile_field A profile field instance, implements \phpbb\profilefields\type\type_base + * @since 3.2.2-RC1 + */ + $vars = array( + 'row', + 'field_block', + 'profile_field', ); + extract($phpbb_dispatcher->trigger_event('core.acp_profile_modify_profile_row', compact($vars))); + + $template->assign_block_vars('fields', $field_block); } $db->sql_freeresult($result); |