[ticket/13911] Add events to configure options for profile fields

Adds core events to includes/acp/acp_profile.php and template events
to adm/style/acp_profile.html to support adding configuration options
to profile fields. Fixed version number and event name.

PHPBB3-13911
This commit is contained in:
javiexin 2015-06-04 19:13:23 +02:00
parent b627a097bb
commit 9057f72fc7
2 changed files with 6 additions and 6 deletions

View file

@ -137,7 +137,7 @@ acp_profile_contact_before
=== ===
* Locations: * Locations:
+ adm/style/acp_profile.html + adm/style/acp_profile.html
* Since: 3.1.5-a4 * Since: 3.1.5-RC1
* Purpose: Add extra options to custom profile field configuration in the ACP * Purpose: Add extra options to custom profile field configuration in the ACP
acp_ranks_edit_after acp_ranks_edit_after

View file

@ -381,7 +381,7 @@ class acp_profile
* @var array field_row Array of data about the field * @var array field_row Array of data about the field
* @var array exclude Array of excluded fields by step * @var array exclude Array of excluded fields by step
* @var array visibility_ary Array of fields that are visibility related * @var array visibility_ary Array of fields that are visibility related
* @since 3.1.5-a4 * @since 3.1.5-RC1
*/ */
$vars = array( $vars = array(
'action', 'action',
@ -683,7 +683,7 @@ class acp_profile
* @var array field_data Array of data about the field * @var array field_data Array of data about the field
* @var array s_hidden_fields Array of hidden fields in case this needs modification * @var array s_hidden_fields Array of hidden fields in case this needs modification
* @var array options Array of options specific to this step * @var array options Array of options specific to this step
* @since 3.1.5-a4 * @since 3.1.5-RC1
*/ */
$vars = array( $vars = array(
'action', 'action',
@ -909,12 +909,12 @@ class acp_profile
/** /**
* Event to modify profile field configuration data before saving to database * Event to modify profile field configuration data before saving to database
* *
* @event core.acp_profile_create_edit_before_save * @event core.acp_profile_create_edit_save_before
* @var string action create|edit * @var string action create|edit
* @var string field_type Type of the field we are dealing with * @var string field_type Type of the field we are dealing with
* @var array field_data Array of data about the field * @var array field_data Array of data about the field
* @var array profile_fields Array of fields to be sent to the database * @var array profile_fields Array of fields to be sent to the database
* @since 3.1.5-a4 * @since 3.1.5-RC1
*/ */
$vars = array( $vars = array(
'action', 'action',
@ -922,7 +922,7 @@ class acp_profile
'field_data', 'field_data',
'profile_fields', 'profile_fields',
); );
extract($phpbb_dispatcher->trigger_event('core.acp_profile_create_edit_before_save', compact($vars))); extract($phpbb_dispatcher->trigger_event('core.acp_profile_create_edit_save_before', compact($vars)));
if ($action == 'create') if ($action == 'create')
{ {