aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp/acp_permission_roles.php
diff options
context:
space:
mode:
authorCesar G <prototech91@gmail.com>2013-12-05 22:35:47 -0800
committerCesar G <prototech91@gmail.com>2013-12-05 23:43:16 -0800
commit97558e5fd489f1cb4d4b7bae025842ff467d97d9 (patch)
treee3ce2c6ead9187e00cb2a9a6529cb3ecd9d4aabe /phpBB/includes/acp/acp_permission_roles.php
parentd399d255b69ad02e7b8d5f043637ffe948bae7e2 (diff)
downloadforums-97558e5fd489f1cb4d4b7bae025842ff467d97d9.tar
forums-97558e5fd489f1cb4d4b7bae025842ff467d97d9.tar.gz
forums-97558e5fd489f1cb4d4b7bae025842ff467d97d9.tar.bz2
forums-97558e5fd489f1cb4d4b7bae025842ff467d97d9.tar.xz
forums-97558e5fd489f1cb4d4b7bae025842ff467d97d9.zip
[ticket/12038] AJAXify move up/down buttons in the permission roles page.
PHPBB3-12038
Diffstat (limited to 'phpBB/includes/acp/acp_permission_roles.php')
-rw-r--r--phpBB/includes/acp/acp_permission_roles.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/phpBB/includes/acp/acp_permission_roles.php b/phpBB/includes/acp/acp_permission_roles.php
index 17e48d6576..21729df4f1 100644
--- a/phpBB/includes/acp/acp_permission_roles.php
+++ b/phpBB/includes/acp/acp_permission_roles.php
@@ -27,6 +27,7 @@ class acp_permission_roles
{
global $db, $user, $auth, $template, $cache, $phpbb_container;
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
+ global $request;
include_once($phpbb_root_path . 'includes/functions_user.' . $phpEx);
include_once($phpbb_root_path . 'includes/acp/auth.' . $phpEx);
@@ -375,6 +376,14 @@ class acp_permission_roles
AND role_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;
}