diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index 7cdaf0fec0..3b55791485 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -101,6 +101,7 @@
  • [Fix] Also remove data from friend/foe table when deleting user. (Bug #45345 - Patch by nickvergessen)
  • [Fix] Correctly hide skiplink in prosilver right-to-left mode. (Bug #45765 - Patch by prototech and bantu)
  • [Fix] Fix dynamic config update routine error if firebird is used (Bug #46315)
  • +
  • [Fix] Allow friends/foes to be added and removed at the same time. (Bug #46255 - Patch by bantu)
  • [Change] Change the data format of the default file ACM to be more secure from tampering and have better performance.
  • [Change] Add index on log_time to the log table to prevent slowdown on boards with many log entries. (Bug #44665 - Patch by bantu)
  • [Change] Template engine now permits to a limited extent variable includes.
  • diff --git a/phpBB/includes/ucp/ucp_zebra.php b/phpBB/includes/ucp/ucp_zebra.php index fb5df9394b..c853c47026 100644 --- a/phpBB/includes/ucp/ucp_zebra.php +++ b/phpBB/includes/ucp/ucp_zebra.php @@ -52,6 +52,21 @@ class ucp_zebra { if (confirm_box(true)) { + // Remove users + if (!empty($data['usernames'])) + { + // Force integer values + $data['usernames'] = array_map('intval', $data['usernames']); + + $sql = 'DELETE FROM ' . ZEBRA_TABLE . ' + WHERE user_id = ' . $user->data['user_id'] . ' + AND ' . $db->sql_in_set('zebra_id', $data['usernames']); + $db->sql_query($sql); + + $updated = true; + } + + // Add users if ($data['add']) { $data['add'] = array_map('trim', array_map('utf8_clean_string', explode("\n", $data['add']))); @@ -183,18 +198,6 @@ class ucp_zebra } } } - else if (sizeof($data['usernames'])) - { - // Force integer values - $data['usernames'] = array_map('intval', $data['usernames']); - - $sql = 'DELETE FROM ' . ZEBRA_TABLE . ' - WHERE user_id = ' . $user->data['user_id'] . ' - AND ' . $db->sql_in_set('zebra_id', $data['usernames']); - $db->sql_query($sql); - - $updated = true; - } if ($updated) {