diff options
author | Dark❶ <dark-1@users.noreply.github.com> | 2019-04-20 14:38:25 +0530 |
---|---|---|
committer | Dark❶ <dark-1@users.noreply.github.com> | 2019-04-20 14:38:25 +0530 |
commit | f7a208d103c756c57f72581d067459b25b764c0e (patch) | |
tree | d5adf4a7746855578af8f285de43186bb6dd4d7a /phpBB/includes/functions_privmsgs.php | |
parent | f905b40ce8bb03309fd87ad32ce424aefe76acd3 (diff) | |
download | forums-f7a208d103c756c57f72581d067459b25b764c0e.tar forums-f7a208d103c756c57f72581d067459b25b764c0e.tar.gz forums-f7a208d103c756c57f72581d067459b25b764c0e.tar.bz2 forums-f7a208d103c756c57f72581d067459b25b764c0e.tar.xz forums-f7a208d103c756c57f72581d067459b25b764c0e.zip |
[ticket/16023] Add core.message_history_modify_template_vars
PHPBB3-16023
Diffstat (limited to 'phpBB/includes/functions_privmsgs.php')
-rw-r--r-- | phpBB/includes/functions_privmsgs.php | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php index 444bf2c7e0..0047dd0169 100644 --- a/phpBB/includes/functions_privmsgs.php +++ b/phpBB/includes/functions_privmsgs.php @@ -2087,7 +2087,7 @@ function message_history($msg_id, $user_id, $message_row, $folder, $in_post_mode $previous_history_pm = $prev_id; } - $template->assign_block_vars('history_row', array( + $template_vars = array( 'MESSAGE_AUTHOR_QUOTE' => (($decoded_message) ? addslashes(get_username_string('username', $author_id, $row['username'], $row['user_colour'], $row['username'])) : ''), 'MESSAGE_AUTHOR_FULL' => get_username_string('full', $author_id, $row['username'], $row['user_colour'], $row['username']), 'MESSAGE_AUTHOR_COLOUR' => get_username_string('colour', $author_id, $row['username'], $row['user_colour'], $row['username']), @@ -2109,8 +2109,25 @@ function message_history($msg_id, $user_id, $message_row, $folder, $in_post_mode 'USER_ID' => $row['user_id'], 'U_VIEW_MESSAGE' => "$url&f=$folder_id&p=" . $row['msg_id'], 'U_QUOTE' => (!$in_post_mode && $auth->acl_get('u_sendpm') && $author_id != ANONYMOUS) ? "$url&mode=compose&action=quote&f=" . $folder_id . "&p=" . $row['msg_id'] : '', - 'U_POST_REPLY_PM' => ($author_id != $user->data['user_id'] && $author_id != ANONYMOUS && $auth->acl_get('u_sendpm')) ? "$url&mode=compose&action=reply&f=$folder_id&p=" . $row['msg_id'] : '') + 'U_POST_REPLY_PM' => ($author_id != $user->data['user_id'] && $author_id != ANONYMOUS && $auth->acl_get('u_sendpm')) ? "$url&mode=compose&action=reply&f=$folder_id&p=" . $row['msg_id'] : '' ); + + /** + * Modify the template vars for displaying the message history in private message + * + * @event core.message_history_modify_template_vars + * @var array template_vars Array containing the query + * @var array row Array containing the action user row + * @since 3.2.6-RC1 + */ + $vars = array( + 'template_vars', + 'row', + ); + extract($phpbb_dispatcher->trigger_event('core.message_history_modify_template_vars', compact($vars))); + + $template->assign_block_vars('history_row', $template_vars); + unset($rowset[$i]); $prev_id = $id; } |