From 9e8ee56404c40cfb0ffbc435a83aa726dc41a8c0 Mon Sep 17 00:00:00 2001 From: Cesar G Date: Thu, 5 Dec 2013 22:36:55 -0800 Subject: [ticket/12038] AJAXify move up/down buttons in report/denial reasons page. PHPBB3-12038 --- phpBB/includes/acp/acp_reasons.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'phpBB/includes/acp/acp_reasons.php') diff --git a/phpBB/includes/acp/acp_reasons.php b/phpBB/includes/acp/acp_reasons.php index 71e9108c2c..26599571d2 100644 --- a/phpBB/includes/acp/acp_reasons.php +++ b/phpBB/includes/acp/acp_reasons.php @@ -26,6 +26,7 @@ class acp_reasons { global $db, $user, $auth, $template, $cache; global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx; + global $request; $user->add_lang(array('mcp', 'acp/posting')); @@ -288,6 +289,13 @@ class acp_reasons WHERE reason_order IN (' . $order . ', ' . (($action == 'move_up') ? $order - 1 : $order + 1) . ')'; $db->sql_query($sql); + if ($request->is_ajax()) + { + $json_response = new \phpbb\json_response; + $json_response->send(array( + 'success' => (bool) $db->sql_affectedrows(), + )); + } break; } -- cgit v1.2.1