1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-06 16:56:44 +02:00

[ticket/12038] AJAXify move up/down buttons in report/denial reasons page.

PHPBB3-12038
This commit is contained in:
Cesar G
2013-12-05 22:36:55 -08:00
parent 58a0764759
commit 9e8ee56404
2 changed files with 13 additions and 11 deletions

View File

@@ -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;
}