mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[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
This commit is contained in:
parent
b41a730471
commit
e05df3bf3d
1 changed files with 11 additions and 0 deletions
|
@ -1906,6 +1906,17 @@ function submit_pm($mode, $subject, &$data, $put_in_outbox = true)
|
||||||
$phpbb_notifications->add_notifications('pm', $pm_data);
|
$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'];
|
return $data['msg_id'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue