mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
Merge branch '3.2.x'
This commit is contained in:
commit
01615bfd14
1 changed files with 14 additions and 0 deletions
|
@ -597,6 +597,20 @@ if (isset($post_data['post_text']))
|
||||||
// Set some default variables
|
// Set some default variables
|
||||||
$uninit = array('post_attachment' => 0, 'poster_id' => $user->data['user_id'], 'enable_magic_url' => 0, 'topic_status' => 0, 'topic_type' => POST_NORMAL, 'post_subject' => '', 'topic_title' => '', 'post_time' => 0, 'post_edit_reason' => '', 'notify_set' => 0);
|
$uninit = array('post_attachment' => 0, 'poster_id' => $user->data['user_id'], 'enable_magic_url' => 0, 'topic_status' => 0, 'topic_type' => POST_NORMAL, 'post_subject' => '', 'topic_title' => '', 'post_time' => 0, 'post_edit_reason' => '', 'notify_set' => 0);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This event allows you to modify the default variables for post_data, and unset them in post_data if needed
|
||||||
|
*
|
||||||
|
* @event core.posting_modify_default_variables
|
||||||
|
* @var array post_data Array with post data
|
||||||
|
* @var array uninit Array with default vars to put into post_data, if they aren't there
|
||||||
|
* @since 3.2.5-RC1
|
||||||
|
*/
|
||||||
|
$vars = array(
|
||||||
|
'post_data',
|
||||||
|
'uninit',
|
||||||
|
);
|
||||||
|
extract($phpbb_dispatcher->trigger_event('core.posting_modify_default_variables', compact($vars)));
|
||||||
|
|
||||||
foreach ($uninit as $var_name => $default_value)
|
foreach ($uninit as $var_name => $default_value)
|
||||||
{
|
{
|
||||||
if (!isset($post_data[$var_name]))
|
if (!isset($post_data[$var_name]))
|
||||||
|
|
Loading…
Add table
Reference in a new issue