aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/posting.php
diff options
context:
space:
mode:
authorDavid King <imkingdavid@gmail.com>2012-08-20 11:37:27 -0400
committerDavid King <imkingdavid@gmail.com>2012-08-20 11:37:27 -0400
commit6613884a60cdf399cd8a3a908bc44247c646bb1b (patch)
treeddf346ec9b48ad8be32b4853d9f664c34e9f895a /phpBB/posting.php
parent310c9069328172a7c0cb890d96b5eb4d14523e78 (diff)
downloadforums-6613884a60cdf399cd8a3a908bc44247c646bb1b.tar
forums-6613884a60cdf399cd8a3a908bc44247c646bb1b.tar.gz
forums-6613884a60cdf399cd8a3a908bc44247c646bb1b.tar.bz2
forums-6613884a60cdf399cd8a3a908bc44247c646bb1b.tar.xz
forums-6613884a60cdf399cd8a3a908bc44247c646bb1b.zip
[feature/add_events] Added core.posting_refresh event
PHPBB3-9550
Diffstat (limited to 'phpBB/posting.php')
-rw-r--r--phpBB/posting.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php
index a17578e343..77b3c8c861 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -39,6 +39,19 @@ $delete = (isset($_POST['delete'])) ? true : false;
$cancel = (isset($_POST['cancel']) && !isset($_POST['save'])) ? true : false;
$refresh = (isset($_POST['add_file']) || isset($_POST['delete_file']) || isset($_POST['cancel_unglobalise']) || $save || $load || $preview) ? true : false;
+
+/**
+* This event allows you to alter the $refresh boolean variable.
+*
+* If $refresh is true the posting form retains previously submitted form data
+*
+* @event core.posting_refresh
+* @var bool refresh Whether or not to retain previously submitted data
+* @since 3.1-A1
+*/
+$vars = array('refresh');
+extract($phpbb_dispatcher->trigger_event('core.posting_refresh', compact($vars)));
+
$mode = ($delete && !$preview && !$refresh && $submit) ? 'delete' : request_var('mode', '');
$error = $post_data = array();