diff options
author | David King <imkingdavid@gmail.com> | 2012-08-20 11:37:27 -0400 |
---|---|---|
committer | David King <imkingdavid@gmail.com> | 2012-08-20 11:37:27 -0400 |
commit | 6613884a60cdf399cd8a3a908bc44247c646bb1b (patch) | |
tree | ddf346ec9b48ad8be32b4853d9f664c34e9f895a /phpBB/posting.php | |
parent | 310c9069328172a7c0cb890d96b5eb4d14523e78 (diff) | |
download | forums-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.php | 13 |
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(); |