diff options
author | Stanislav Atanasov <lucifer@anavaro.com> | 2014-06-11 03:27:14 +0300 |
---|---|---|
committer | Stanislav Atanasov <lucifer@anavaro.com> | 2014-06-22 21:54:51 +0300 |
commit | e05df3bf3d478a7442698f810b9ad01d872e2310 (patch) | |
tree | 80f5ae3aec1ca6b68c400bd00734c13d88d1e43d | |
parent | b41a730471f2fad7a2466688d323c5563848c640 (diff) | |
download | forums-e05df3bf3d478a7442698f810b9ad01d872e2310.tar forums-e05df3bf3d478a7442698f810b9ad01d872e2310.tar.gz forums-e05df3bf3d478a7442698f810b9ad01d872e2310.tar.bz2 forums-e05df3bf3d478a7442698f810b9ad01d872e2310.tar.xz forums-e05df3bf3d478a7442698f810b9ad01d872e2310.zip |
[ticket/12690] Add core.submit_pm_after event
Add core.submit_pm_after to funtion submit_pm.
Event will return just submited msg_id. It should be plased
just before return $data['msg_id'];
Justification:
Using only core.submit_pm_before does not allow to
follow up after message submission.
The message ID is recieved at DB submission.
Some times we need the MSG_ID as identifier
PHPBB3-12690
-rw-r--r-- | phpBB/includes/functions_privmsgs.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php index 92655cd035..2965143055 100644 --- a/phpBB/includes/functions_privmsgs.php +++ b/phpBB/includes/functions_privmsgs.php @@ -1906,6 +1906,17 @@ function submit_pm($mode, $subject, &$data, $put_in_outbox = true) $phpbb_notifications->add_notifications('pm', $pm_data); } + /** + * Get PM message ID after submission to DB + * + * @event core.submit_pm_after + * @var int msg_id message ID + * @since 3.1.0-b5 + */ + $msg_id = $data['msg_id']; + $vars = array('msg_id'); + extract($phpbb_dispatcher->trigger_event('core.submit_pm_after', compact($vars))); + return $data['msg_id']; } |