aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/ucp
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/ucp')
-rw-r--r--phpBB/includes/ucp/ucp_main.php4
-rw-r--r--phpBB/includes/ucp/ucp_pm_compose.php22
-rw-r--r--phpBB/includes/ucp/ucp_pm_viewmessage.php3
3 files changed, 24 insertions, 5 deletions
diff --git a/phpBB/includes/ucp/ucp_main.php b/phpBB/includes/ucp/ucp_main.php
index ec652a5e45..5214de8c7c 100644
--- a/phpBB/includes/ucp/ucp_main.php
+++ b/phpBB/includes/ucp/ucp_main.php
@@ -28,9 +28,9 @@ class ucp_main
var $p_master;
var $u_action;
- function __construct(&$p_master)
+ function __construct($p_master)
{
- $this->p_master = &$p_master;
+ $this->p_master = $p_master;
}
function main($id, $mode)
diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php
index bc59d8ca86..621a945479 100644
--- a/phpBB/includes/ucp/ucp_pm_compose.php
+++ b/phpBB/includes/ucp/ucp_pm_compose.php
@@ -986,7 +986,11 @@ function compose_pm($id, $mode, $action, $user_folders = array())
$quote_attributes['post_id'] = $post['msg_id'];
}
- phpbb_format_quote($bbcode_status, $quote_attributes, $phpbb_container->get('text_formatter.utils'), $message_parser, $message_link);
+ /** @var \phpbb\language\language $language */
+ $language = $phpbb_container->get('language');
+ /** @var \phpbb\textformatter\utils_interface $text_formatter_utils */
+ $text_formatter_utils = $phpbb_container->get('text_formatter.utils');
+ phpbb_format_quote($language, $message_parser, $text_formatter_utils, $bbcode_status, $quote_attributes, $message_link);
}
if (($action == 'reply' || $action == 'quote' || $action == 'quotepost') && !$preview && !$refresh)
@@ -1191,7 +1195,7 @@ function compose_pm($id, $mode, $action, $user_folders = array())
$controller_helper = $phpbb_container->get('controller.helper');
// Start assigning vars for main posting page ...
- $template->assign_vars(array(
+ $template_ary = array(
'L_POST_A' => $page_title,
'L_ICON' => $user->lang['PM_ICON'],
'L_MESSAGE_BODY_EXPLAIN' => $user->lang('MESSAGE_BODY_EXPLAIN', (int) $config['max_post_chars']),
@@ -1236,7 +1240,19 @@ function compose_pm($id, $mode, $action, $user_folders = array())
'S_CLOSE_PROGRESS_WINDOW' => isset($_POST['add_file']),
'U_PROGRESS_BAR' => append_sid("{$phpbb_root_path}posting.$phpEx", 'f=0&mode=popup'),
'UA_PROGRESS_BAR' => addslashes(append_sid("{$phpbb_root_path}posting.$phpEx", 'f=0&mode=popup')),
- ));
+ );
+
+ /**
+ * Modify the default template vars
+ *
+ * @event core.ucp_pm_compose_template
+ * @var array template_ary Template variables
+ * @since 3.2.6-RC1
+ */
+ $vars = array('template_ary');
+ extract($phpbb_dispatcher->trigger_event('core.ucp_pm_compose_template', compact($vars)));
+
+ $template->assign_vars($template_ary);
// Build custom bbcodes array
display_custom_bbcodes();
diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php
index 5d7e32c8f3..7c0091ef47 100644
--- a/phpBB/includes/ucp/ucp_pm_viewmessage.php
+++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php
@@ -296,7 +296,9 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
* @var array cp_row Array with senders custom profile field data
* @var array msg_data Template array with message data
* @var array user_info User data of the sender
+ * @var array attachments Attachments data
* @since 3.2.2-RC1
+ * @changed 3.2.5-RC1 Added attachments
*/
$vars = array(
'id',
@@ -308,6 +310,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
'cp_row',
'msg_data',
'user_info',
+ 'attachments',
);
extract($phpbb_dispatcher->trigger_event('core.ucp_pm_view_message', compact($vars)));