aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorKailey Truscott <kinerity@yahoo.com>2015-02-19 20:50:51 -0500
committerKailey Truscott <kinerity@yahoo.com>2015-02-19 20:50:51 -0500
commitd28d90bd905152456bd2bad2f694f9ee1337b5af (patch)
treefbc5409cfcf966299d57b6682c17ccb51b97c9e6 /phpBB
parente4b44281737728c3af75fc6d1af13721cfe7d8be (diff)
downloadforums-d28d90bd905152456bd2bad2f694f9ee1337b5af.tar
forums-d28d90bd905152456bd2bad2f694f9ee1337b5af.tar.gz
forums-d28d90bd905152456bd2bad2f694f9ee1337b5af.tar.bz2
forums-d28d90bd905152456bd2bad2f694f9ee1337b5af.tar.xz
forums-d28d90bd905152456bd2bad2f694f9ee1337b5af.zip
[ticket/13637] Add core.ucp_pm_compose_alter_vars PHP event
Add a new PHP event to ucp_pm_compose to alter the default vars PHPBB3-13637
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/includes/ucp/ucp_pm_compose.php26
1 files changed, 26 insertions, 0 deletions
diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php
index f3b59186a6..d3b82c4448 100644
--- a/phpBB/includes/ucp/ucp_pm_compose.php
+++ b/phpBB/includes/ucp/ucp_pm_compose.php
@@ -90,6 +90,32 @@ function compose_pm($id, $mode, $action, $user_folders = array())
// we include the language file here
$user->add_lang('viewtopic');
+ /**
+ * Modify the default vars before composing a PM
+ *
+ * @event core.ucp_pm_compose_alter_vars
+ * @var int msg_id topic_id in the page request
+ * @var int to_user_id The id of whom the message is to
+ * @var int to_group_id The id of the group whom the message is to
+ * @var bool submit Whether the user is sending the PM or not
+ * @var bool preview Whether the user is previewing the PM or not
+ * @var string action One of: post, reply, quote, forward, quotepost, edit, delete, smilies
+ * @var bool delete Whether the user is deleting the PM
+ * @var int reply_to_all Value of reply_to_all request variable.
+ * @since 3.1.4-RC1
+ */
+ $vars = array(
+ 'msg_id',
+ 'to_user_id',
+ 'to_group_id',
+ 'submit',
+ 'preview',
+ 'action',
+ 'delete',
+ 'reply_to_all',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.ucp_pm_compose_alter_vars', compact($vars)));
+
// Output PM_TO box if message composing
if ($action != 'edit')
{