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 | |
| 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
| -rw-r--r-- | phpBB/posting.php | 24 | ||||
| -rw-r--r-- | phpBB/styles/prosilver/template/plupload.html | 2 |
2 files changed, 23 insertions, 3 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? diff --git a/phpBB/styles/prosilver/template/plupload.html b/phpBB/styles/prosilver/template/plupload.html index 2f68fe3efe..dbcea32455 100644 --- a/phpBB/styles/prosilver/template/plupload.html +++ b/phpBB/styles/prosilver/template/plupload.html @@ -51,7 +51,7 @@ phpbb.plupload = { unique_names: true, filters: [{FILTERS}], {S_RESIZE} - headers: {'X-PHPBB-USING-PLUPLOAD': '1'}, + headers: {'X-PHPBB-USING-PLUPLOAD': '1', 'X-Requested-With': 'XMLHttpRequest'}, file_data_name: 'fileupload', multipart_params: {'add_file': '{LA_ADD_FILE}'}, img_path: '{T_ASSETS_PATH}/plupload/jquery.plupload.queue/img', |
