mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
Merge pull request #2827 from brunoais/ticket/12929
[ticket/12929] core.ucp_pm_compose_compose_pm_basic_info_query_before
This commit is contained in:
commit
3c91fbeaa6
1 changed files with 36 additions and 0 deletions
|
@ -233,6 +233,42 @@ function compose_pm($id, $mode, $action, $user_folders = array())
|
||||||
|
|
||||||
if ($sql)
|
if ($sql)
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* Alter sql query to get message for user to write the PM
|
||||||
|
*
|
||||||
|
* @event core.ucp_pm_compose_compose_pm_basic_info_query_before
|
||||||
|
* @var string sql String with the query to be executed
|
||||||
|
* @var array forum_list List of forums that contain the posts
|
||||||
|
* @var int visibility_const Integer with one of the possible ITEM_* constant values
|
||||||
|
* @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.
|
||||||
|
* @var string limit_time_sql String with the SQL code to limit the time interval of the post (Note: May be empty string)
|
||||||
|
* @var string sort_order_sql String with the ORDER BY SQL code used in this query
|
||||||
|
* @since 3.1.0-RC5
|
||||||
|
*/
|
||||||
|
$vars = array(
|
||||||
|
'sql',
|
||||||
|
'forum_list',
|
||||||
|
'visibility_const',
|
||||||
|
'msg_id',
|
||||||
|
'to_user_id',
|
||||||
|
'to_group_id',
|
||||||
|
'submit',
|
||||||
|
'preview',
|
||||||
|
'action',
|
||||||
|
'delete',
|
||||||
|
'reply_to_all',
|
||||||
|
'limit_time_sql',
|
||||||
|
'sort_order_sql',
|
||||||
|
);
|
||||||
|
extract($phpbb_dispatcher->trigger_event('core.ucp_pm_compose_compose_pm_basic_info_query_before', compact($vars)));
|
||||||
|
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
$post = $db->sql_fetchrow($result);
|
$post = $db->sql_fetchrow($result);
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
|
|
Loading…
Add table
Reference in a new issue