From 70ecc3462dc152e640cbbee521b3ffd613112ce8 Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Sat, 21 Dec 2024 15:42:33 +0700 Subject: [PATCH] Minor improvements (#1720) * Minor improvements * Update CHANGELOG.md --- CHANGELOG.md | 2 +- admin/admin_mass_email.php | 11 +++-------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 68008dd74..f38692684 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ - [PHP 8.4] Fixed some deprecations [\#1718](https://github.com/torrentpier/torrentpier/pull/1718) ([belomaxorka](https://github.com/belomaxorka)) - [Configurable] Show magnet-links for guests [\#1712](https://github.com/torrentpier/torrentpier/pull/1712) ([belomaxorka](https://github.com/belomaxorka)) - Set `cursor: pointer;` for buttons, inputs (buttons) [\#1710](https://github.com/torrentpier/torrentpier/pull/1710), [\#1711](https://github.com/torrentpier/torrentpier/pull/1711) ([belomaxorka](https://github.com/belomaxorka)) -- Minor improvements [\#1705](https://github.com/torrentpier/torrentpier/pull/1705), [\#1713](https://github.com/torrentpier/torrentpier/pull/1713), [\#1715](https://github.com/torrentpier/torrentpier/pull/1715), [\#1717](https://github.com/torrentpier/torrentpier/pull/1717), [\#1719](https://github.com/torrentpier/torrentpier/pull/1719) ([belomaxorka](https://github.com/belomaxorka)) +- Minor improvements [\#1705](https://github.com/torrentpier/torrentpier/pull/1705), [\#1713](https://github.com/torrentpier/torrentpier/pull/1713), [\#1715](https://github.com/torrentpier/torrentpier/pull/1715), [\#1717](https://github.com/torrentpier/torrentpier/pull/1717), [\#1719](https://github.com/torrentpier/torrentpier/pull/1719), [\#1720](https://github.com/torrentpier/torrentpier/pull/1720) ([belomaxorka](https://github.com/belomaxorka)) - New Crowdin updates [\#1704](https://github.com/torrentpier/torrentpier/pull/1704), [\#1706](https://github.com/torrentpier/torrentpier/pull/1706), [\#1714](https://github.com/torrentpier/torrentpier/pull/1714), [\#1716](https://github.com/torrentpier/torrentpier/pull/1716) ([Exileum](https://github.com/Exileum)) ## [v2.4.5-rc.1](https://github.com/torrentpier/torrentpier/tree/v2.4.5-rc.1) (2024-12-08) diff --git a/admin/admin_mass_email.php b/admin/admin_mass_email.php index 40f775558..adf76b638 100644 --- a/admin/admin_mass_email.php +++ b/admin/admin_mass_email.php @@ -40,12 +40,7 @@ if (isset($_POST['submit'])) { } if (!$errors) { - $sql = DB()->fetch_rowset('SELECT ban_userid FROM ' . BB_BANLIST . ' WHERE ban_userid != 0'); - - foreach ($sql as $row) { - $user_id_sql[] = ',' . $row['ban_userid']; - } - $user_id_sql = implode('', $user_id_sql); + $banned_users = ($get_banned_users = get_banned_users()) ? (', ' . implode(', ', $get_banned_users)) : ''; if ($group_id != -1) { $user_list = DB()->fetch_rowset(' @@ -55,14 +50,14 @@ if (isset($_POST['submit'])) { AND ug.user_pending = 0 AND u.user_id = ug.user_id AND u.user_active = 1 - AND u.user_id NOT IN(" . EXCLUDED_USERS . $user_id_sql . ') + AND u.user_id NOT IN(" . EXCLUDED_USERS . $banned_users . ') '); } else { $user_list = DB()->fetch_rowset(' SELECT username, user_email, user_lang FROM ' . BB_USERS . ' WHERE user_active = 1 - AND user_id NOT IN(' . EXCLUDED_USERS . $user_id_sql . ') + AND user_id NOT IN(' . EXCLUDED_USERS . $banned_users . ') '); }