diff options
author | Marc Alexander <admin@m-a-styles.de> | 2017-06-25 15:12:32 +0200 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2017-06-25 15:12:32 +0200 |
commit | 8938a0ce98c5f490abdd6c4149055c2f214ad04c (patch) | |
tree | 8d39f94c614bf4028a1df6a3e5bf2731998e3a35 /phpBB/posting.php | |
parent | 689ebd3bb64ad76652dc9b97ee4761356faa0a32 (diff) | |
parent | ca5243810f313c5438e2c778cdaecfbcb375e8eb (diff) | |
download | forums-8938a0ce98c5f490abdd6c4149055c2f214ad04c.tar forums-8938a0ce98c5f490abdd6c4149055c2f214ad04c.tar.gz forums-8938a0ce98c5f490abdd6c4149055c2f214ad04c.tar.bz2 forums-8938a0ce98c5f490abdd6c4149055c2f214ad04c.tar.xz forums-8938a0ce98c5f490abdd6c4149055c2f214ad04c.zip |
Merge pull request #4852 from javiexin/ticket/15248
[ticket/15248] Make use of event parameters of core.modify_posting_auth
Diffstat (limited to 'phpBB/posting.php')
-rw-r--r-- | phpBB/posting.php | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php index 3ab78b5db5..35c1f84fa3 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -340,11 +340,6 @@ switch ($mode) $is_authed = true; $mode = 'soft_delete'; } - else if (!$is_authed) - { - // Display the same error message for softdelete we use for delete - $mode = 'delete'; - } break; } /** @@ -393,13 +388,13 @@ $vars = array( ); extract($phpbb_dispatcher->trigger_event('core.modify_posting_auth', compact($vars))); -if (!$is_authed) +if (!$is_authed || !empty($error)) { - $check_auth = ($mode == 'quote') ? 'reply' : $mode; + $check_auth = ($mode == 'quote') ? 'reply' : (($mode == 'soft_delete') ? 'delete' : $mode); if ($user->data['is_registered']) { - trigger_error('USER_CANNOT_' . strtoupper($check_auth)); + trigger_error(empty($error) ? 'USER_CANNOT_' . strtoupper($check_auth) : implode('<br/>', $error)); } $message = $user->lang['LOGIN_EXPLAIN_' . strtoupper($mode)]; |