aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2018-11-29 21:12:27 +0100
committerMarc Alexander <admin@m-a-styles.de>2018-11-29 21:12:27 +0100
commit9e6c2251dfceb8e54b25e03a335e8d55b7b92f58 (patch)
treea8c4b505ba8753485a5e6677015ac6403b4dcd1b /phpBB
parent15ba5f700d41407315581033bd58e49d6aa450fc (diff)
parentd5147c2271671879de211ff85dbf07fcaef22017 (diff)
downloadforums-9e6c2251dfceb8e54b25e03a335e8d55b7b92f58.tar
forums-9e6c2251dfceb8e54b25e03a335e8d55b7b92f58.tar.gz
forums-9e6c2251dfceb8e54b25e03a335e8d55b7b92f58.tar.bz2
forums-9e6c2251dfceb8e54b25e03a335e8d55b7b92f58.tar.xz
forums-9e6c2251dfceb8e54b25e03a335e8d55b7b92f58.zip
Merge pull request #5455 from toxyy/ticket-15879
[ticket/15879] Add core.posting_modify_default_variables
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/posting.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php
index 8d40652574..e2329d610d 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -597,6 +597,20 @@ if (isset($post_data['post_text']))
// 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);
+/**
+* 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)
{
if (!isset($post_data[$var_name]))