diff options
author | Cesar G <prototech91@gmail.com> | 2013-11-10 18:31:58 -0800 |
---|---|---|
committer | Cesar G <prototech91@gmail.com> | 2014-01-17 19:20:36 -0800 |
commit | 2719a18f7fc6ee3112c3ebc73d50e7c4d2f9d57f (patch) | |
tree | 86e3c16eb38341d8452b1310320e4458124543bd /phpBB/posting.php | |
parent | 0ea110292b31bff28cced69dc066cc62ed09d208 (diff) | |
download | forums-2719a18f7fc6ee3112c3ebc73d50e7c4d2f9d57f.tar forums-2719a18f7fc6ee3112c3ebc73d50e7c4d2f9d57f.tar.gz forums-2719a18f7fc6ee3112c3ebc73d50e7c4d2f9d57f.tar.bz2 forums-2719a18f7fc6ee3112c3ebc73d50e7c4d2f9d57f.tar.xz forums-2719a18f7fc6ee3112c3ebc73d50e7c4d2f9d57f.zip |
[ticket/11915] Make it possible to display trigger_error() messages to user.
PHPBB3-11915
Diffstat (limited to 'phpBB/posting.php')
-rw-r--r-- | phpBB/posting.php | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php index 1711b91093..6066511d1c 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -255,8 +255,18 @@ if (!$auth->acl_get('f_read', $forum_id)) { trigger_error('USER_CANNOT_READ'); } + $message = $user->lang['LOGIN_EXPLAIN_POST']; - login_box('', $user->lang['LOGIN_EXPLAIN_POST']); + if ($request->is_ajax()) + { + $json = new phpbb\json_response(); + $json->send(array( + 'title' => $user->lang['INFORMATION'], + 'message' => $message, + )); + } + + login_box('', $message); } // Permission to do the action asked? @@ -326,8 +336,18 @@ if (!$is_authed) { trigger_error('USER_CANNOT_' . strtoupper($check_auth)); } + $message = $user->lang['LOGIN_EXPLAIN_' . strtoupper($mode)]; + + if ($request->is_ajax()) + { + $json = new phpbb\json_response(); + $json->send(array( + 'title' => $user->lang['INFORMATION'], + 'message' => $message, + )); + } - login_box('', $user->lang['LOGIN_EXPLAIN_' . strtoupper($mode)]); + login_box('', $message); } // Is the user able to post within this forum? |