aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2014-12-27 14:22:48 +0100
committerJoas Schilling <nickvergessen@gmx.de>2014-12-27 14:22:48 +0100
commita92589436a60262f1ba7960cd6b5af63a158e53b (patch)
tree55d6d4f688494bd1a4c4e924a08371ef5bedef8b
parentb0f1a0f4bbedf496b15069ca151eca44292993eb (diff)
parent96a734b012cdff268f699b7468af117a013e7967 (diff)
downloadforums-a92589436a60262f1ba7960cd6b5af63a158e53b.tar
forums-a92589436a60262f1ba7960cd6b5af63a158e53b.tar.gz
forums-a92589436a60262f1ba7960cd6b5af63a158e53b.tar.bz2
forums-a92589436a60262f1ba7960cd6b5af63a158e53b.tar.xz
forums-a92589436a60262f1ba7960cd6b5af63a158e53b.zip
Merge pull request #3213 from brunoais/ticket/13158
[ticket/13158] Allow adding extra auth checks when the user is posting
-rw-r--r--phpBB/posting.php42
1 files changed, 42 insertions, 0 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php
index dda7455845..10c3b696e6 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -344,6 +344,48 @@ switch ($mode)
}
break;
}
+/**
+* This event allows you to do extra auth checks and verify if the user
+* has the required permissions
+*
+* Extensions should only change the error and is_authed variables.
+*
+* @event core.modify_posting_auth
+* @var int post_id ID of the post
+* @var int topic_id ID of the topic
+* @var int forum_id ID of the forum
+* @var int draft_id ID of the draft
+* @var int lastclick Timestamp of when the form was last loaded
+* @var bool submit Whether or not the form has been submitted
+* @var bool preview Whether or not the post is being previewed
+* @var bool save Whether or not a draft is being saved
+* @var bool load Whether or not a draft is being loaded
+* @var bool refresh Whether or not to retain previously submitted data
+* @var string mode What action to take if the form has been submitted
+* post|reply|quote|edit|delete|bump|smilies|popup
+* @var array error Any error strings; a non-empty array aborts
+* form submission.
+* NOTE: Should be actual language strings, NOT
+* language keys.
+* @var bool is_authed Does the user have the required permissions?
+* @since 3.1.3-RC1
+*/
+$vars = array(
+ 'post_id',
+ 'topic_id',
+ 'forum_id',
+ 'draft_id',
+ 'lastclick',
+ 'submit',
+ 'preview',
+ 'save',
+ 'load',
+ 'refresh',
+ 'mode',
+ 'error',
+ 'is_authed',
+);
+extract($phpbb_dispatcher->trigger_event('core.modify_posting_auth', compact($vars)));
if (!$is_authed)
{