1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

[ticket/12038] AJAXify move up/down buttons in the smilies/topic icons page.

PHPBB3-12038
This commit is contained in:
Cesar G
2013-12-05 22:33:03 -08:00
parent 7b86a5bc60
commit 8d9cc63c19
2 changed files with 15 additions and 4 deletions

View File

@@ -832,6 +832,7 @@ class acp_icons
WHERE {$fields}_order = $switch_order_id
AND {$fields}_id <> $icon_id";
$db->sql_query($sql);
$move_executed = (bool) $db->sql_affectedrows();
// Only update the other entry too if the previous entry got updated
if ($db->sql_affectedrows())
@@ -846,6 +847,14 @@ class acp_icons
$cache->destroy('_icons');
$cache->destroy('sql', $table);
if ($request->is_ajax())
{
$json_response = new \phpbb\json_response;
$json_response->send(array(
'success' => $move_executed,
));
}
break;
}