mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[ticket/10271] Changed AJAX functions to $request->is_ajax().
PHPBB3-10271
This commit is contained in:
parent
69eb7b8332
commit
94172b54dd
2 changed files with 8 additions and 8 deletions
|
@ -25,7 +25,7 @@ class acp_forums
|
||||||
|
|
||||||
function main($id, $mode)
|
function main($id, $mode)
|
||||||
{
|
{
|
||||||
global $db, $user, $auth, $template, $cache;
|
global $db, $user, $auth, $template, $cache, $request;
|
||||||
global $config, $phpbb_admin_path, $phpbb_root_path, $phpEx;
|
global $config, $phpbb_admin_path, $phpbb_root_path, $phpEx;
|
||||||
|
|
||||||
$user->add_lang('acp/forums');
|
$user->add_lang('acp/forums');
|
||||||
|
@ -256,7 +256,7 @@ class acp_forums
|
||||||
$cache->destroy('sql', FORUMS_TABLE);
|
$cache->destroy('sql', FORUMS_TABLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest')
|
if ($request->is_ajax())
|
||||||
{
|
{
|
||||||
echo json_encode(array('success' => ($move_forum_name !== false)));
|
echo json_encode(array('success' => ($move_forum_name !== false)));
|
||||||
exit;
|
exit;
|
||||||
|
|
|
@ -2448,9 +2448,9 @@ function build_url($strip_vars = false)
|
||||||
*/
|
*/
|
||||||
function meta_refresh($time, $url, $disable_cd_check = false)
|
function meta_refresh($time, $url, $disable_cd_check = false)
|
||||||
{
|
{
|
||||||
global $template, $refresh_data;
|
global $template, $refresh_data, $request;
|
||||||
|
|
||||||
if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest')
|
if ($request->is_ajax())
|
||||||
{
|
{
|
||||||
$refresh_data = array(
|
$refresh_data = array(
|
||||||
'time' => $time,
|
'time' => $time,
|
||||||
|
@ -2629,7 +2629,7 @@ function check_form_key($form_name, $timespan = false, $return_page = '', $trigg
|
||||||
*/
|
*/
|
||||||
function confirm_box($check, $title = '', $hidden = '', $html_body = 'confirm_body.html', $u_action = '')
|
function confirm_box($check, $title = '', $hidden = '', $html_body = 'confirm_body.html', $u_action = '')
|
||||||
{
|
{
|
||||||
global $user, $template, $db;
|
global $user, $template, $db, $request;
|
||||||
global $phpEx, $phpbb_root_path, $request;
|
global $phpEx, $phpbb_root_path, $request;
|
||||||
|
|
||||||
if (isset($_POST['cancel']))
|
if (isset($_POST['cancel']))
|
||||||
|
@ -2710,7 +2710,7 @@ function confirm_box($check, $title = '', $hidden = '', $html_body = 'confirm_bo
|
||||||
$db->sql_query($sql);
|
$db->sql_query($sql);
|
||||||
|
|
||||||
|
|
||||||
if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest')
|
if ($request->is_ajax())
|
||||||
{
|
{
|
||||||
$u_action .= '&confirm_uid=' . $user->data['user_id'] . '&sess=' . $user->session_id . '&sid=' . $user->session_id;
|
$u_action .= '&confirm_uid=' . $user->data['user_id'] . '&sess=' . $user->session_id . '&sid=' . $user->session_id;
|
||||||
echo json_encode(array(
|
echo json_encode(array(
|
||||||
|
@ -3748,7 +3748,7 @@ function phpbb_checkdnsrr($host, $type = 'MX')
|
||||||
*/
|
*/
|
||||||
function msg_handler($errno, $msg_text, $errfile, $errline)
|
function msg_handler($errno, $msg_text, $errfile, $errline)
|
||||||
{
|
{
|
||||||
global $cache, $db, $auth, $template, $config, $user;
|
global $cache, $db, $auth, $template, $config, $user, $request;
|
||||||
global $phpEx, $phpbb_root_path, $msg_title, $msg_long_text;
|
global $phpEx, $phpbb_root_path, $msg_title, $msg_long_text;
|
||||||
|
|
||||||
// Do not display notices if we suppress them via @
|
// Do not display notices if we suppress them via @
|
||||||
|
@ -3947,7 +3947,7 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
|
||||||
'S_USER_NOTICE' => ($errno == E_USER_NOTICE) ? true : false)
|
'S_USER_NOTICE' => ($errno == E_USER_NOTICE) ? true : false)
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest')
|
if ($request->is_ajax())
|
||||||
{
|
{
|
||||||
global $refresh_data;
|
global $refresh_data;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue