aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2014-04-15 22:25:43 +0200
committerJoas Schilling <nickvergessen@gmx.de>2014-04-15 22:25:43 +0200
commitc63b5275d858a3ec11674d20d1d2479e5c7477b5 (patch)
tree585b2526d4b12c080a51d720f71c3aae00e8fc21 /phpBB
parent7d4be1fe195061fa9ff38d2b83480874843d36bb (diff)
parent84c8c61eb2aa9b18b3dc4783e82ac7cf3d891046 (diff)
downloadforums-c63b5275d858a3ec11674d20d1d2479e5c7477b5.tar
forums-c63b5275d858a3ec11674d20d1d2479e5c7477b5.tar.gz
forums-c63b5275d858a3ec11674d20d1d2479e5c7477b5.tar.bz2
forums-c63b5275d858a3ec11674d20d1d2479e5c7477b5.tar.xz
forums-c63b5275d858a3ec11674d20d1d2479e5c7477b5.zip
Merge branch 'ticket/lucifer4o/12344' into develop-ascraeus
* ticket/lucifer4o/12344: [ticket/12344] Add core.pm_submit_before to function submit_pm
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/includes/functions_privmsgs.php14
1 files changed, 13 insertions, 1 deletions
diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php
index 17d67b4a23..9b44984dfa 100644
--- a/phpBB/includes/functions_privmsgs.php
+++ b/phpBB/includes/functions_privmsgs.php
@@ -1575,7 +1575,7 @@ function get_folder_status($folder_id, $folder)
*/
function submit_pm($mode, $subject, &$data, $put_in_outbox = true)
{
- global $db, $auth, $config, $phpEx, $template, $user, $phpbb_root_path, $phpbb_container;
+ global $db, $auth, $config, $phpEx, $template, $user, $phpbb_root_path, $phpbb_container, $phpbb_dispatcher;
// We do not handle erasing pms here
if ($mode == 'delete')
@@ -1585,6 +1585,18 @@ function submit_pm($mode, $subject, &$data, $put_in_outbox = true)
$current_time = time();
+ /**
+ * Get all parts of the PM that are to be submited to the DB.
+ *
+ * @event core.submit_pm_before
+ * @var string mode PM Post mode - post|reply|quote|quotepost|forward|edit
+ * @var string subject Subject of the private message
+ * @var array data The whole row data of the PM.
+ * @since 3.1.0-b3
+ */
+ $vars = array('mode', 'subject', 'data');
+ extract($phpbb_dispatcher->trigger_event('core.submit_pm_before', compact($vars)));
+
// Collect some basic information about which tables and which rows to update/insert
$sql_data = array();
$root_level = 0;