diff options
| author | Tristan Darricau <tristan.darricau@sensiolabs.com> | 2015-10-14 08:59:17 +0200 |
|---|---|---|
| committer | Tristan Darricau <tristan.darricau@sensiolabs.com> | 2015-10-14 08:59:17 +0200 |
| commit | 1d6e1732597fca176353e674c72b2543c77273f3 (patch) | |
| tree | 51fb4cca11a8df7c87145a833b986f5d9832b838 /phpBB/includes/functions_privmsgs.php | |
| parent | cac090b659a90749a8ea6ed7f62af980ffe7c60d (diff) | |
| parent | 102d737d811739aa6ff9687e1585c2012b394d02 (diff) | |
| download | forums-1d6e1732597fca176353e674c72b2543c77273f3.tar forums-1d6e1732597fca176353e674c72b2543c77273f3.tar.gz forums-1d6e1732597fca176353e674c72b2543c77273f3.tar.bz2 forums-1d6e1732597fca176353e674c72b2543c77273f3.tar.xz forums-1d6e1732597fca176353e674c72b2543c77273f3.zip | |
Merge pull request #3965 from marc1706/ticket/14234
[ticket/14234] Use replacement variables instead of references in events
* marc1706/ticket/14234:
[ticket/14234] Fix event doc blocks
[ticket/14234] Get rid of undefined variables
[ticket/14234] Fix change version and remove more references
[ticket/14234] Replace more references with variables
[ticket/14234] Use replacement variables instead of references in events
Diffstat (limited to 'phpBB/includes/functions_privmsgs.php')
| -rw-r--r-- | phpBB/includes/functions_privmsgs.php | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php index ee18e85657..b2928d5df8 100644 --- a/phpBB/includes/functions_privmsgs.php +++ b/phpBB/includes/functions_privmsgs.php @@ -1620,17 +1620,21 @@ function submit_pm($mode, $subject, &$data, $put_in_outbox = true) $current_time = time(); + $data_ary = $data; /** * 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. + * @var array data_ary The whole row data of the PM. * @since 3.1.0-b3 + * @change 3.2.0-a1 Replaced data with data_ary */ - $vars = array('mode', 'subject', 'data'); + $vars = array('mode', 'subject', 'data_ary'); extract($phpbb_dispatcher->trigger_event('core.submit_pm_before', compact($vars))); + $data = $data_ary; + unset($data_ary); // Collect some basic information about which tables and which rows to update/insert $sql_data = array(); @@ -1939,18 +1943,22 @@ function submit_pm($mode, $subject, &$data, $put_in_outbox = true) $phpbb_notifications->add_notifications('notification.type.pm', $pm_data); } + $data_ary = $data; /** * Get PM message ID after submission to DB * * @event core.submit_pm_after * @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. + * @var array data_ary The whole row data of the PM. * @var array pm_data The data sent to notification class * @since 3.1.0-b5 + * @change 3.2.0-a1 Replaced data with data_ary */ - $vars = array('mode', 'subject', 'data', 'pm_data'); + $vars = array('mode', 'subject', 'data_ary', 'pm_data'); extract($phpbb_dispatcher->trigger_event('core.submit_pm_after', compact($vars))); + $data = $data_ary; + unset($data_ary); return $data['msg_id']; } |
