Merge pull request #5464 from 3D-I/ticket/15891

[ticket/15891] Add core.memberlist_modify_view_profile_template_vars
This commit is contained in:
Marc Alexander 2019-03-30 16:54:44 +01:00
commit 3f498c9e69
No known key found for this signature in database
GPG key ID: 50E0D2423696F995

View file

@ -763,7 +763,8 @@ switch ($mode)
$member['posts_in_queue'] = 0;
}
$template->assign_vars(array(
// Define the main array of vars to assign to memberlist_view.html
$template_ary = array(
'L_POSTS_IN_QUEUE' => $user->lang('NUM_POSTS_IN_QUEUE', $member['posts_in_queue']),
'POSTS_DAY' => $user->lang('POST_DAY', $posts_per_day),
@ -798,7 +799,22 @@ switch ($mode)
'U_REMOVE_FOE' => ($foe && $foes_enabled) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=zebra&remove=1&mode=foes&usernames[]=' . $user_id) : '',
'U_CANONICAL' => generate_board_url() . '/' . append_sid("memberlist.$phpEx", 'mode=viewprofile&u=' . $user_id, true, ''),
));
);
/**
* Modify user's template vars before we display the profile
*
* @event core.memberlist_modify_view_profile_template_vars
* @var array template_ary Array with user's template vars
* @since 3.2.6-RC1
*/
$vars = array(
'template_ary',
);
extract($phpbb_dispatcher->trigger_event('core.memberlist_modify_view_profile_template_vars', compact($vars)));
// Assign vars to memberlist_view.html
$template->assign_vars($template_ary);
if (!empty($profile_fields['row']))
{