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)]; - login_box('', $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('', $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',