From fdc56b42c15af9b107b4a1ec2850444eee6ccd58 Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Thu, 8 Feb 2024 17:57:03 +0700 Subject: [PATCH] Minor improvements (#1391) * Minor improvements * Update CHANGELOG.md --- CHANGELOG.md | 2 +- library/language/source/main.php | 1 + modcp.php | 8 +++----- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a01c77ee..cd59ae226 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,7 @@ - Removed converting for legacy md5 passwords [\#1386](https://github.com/torrentpier/torrentpier/pull/1386) ([belomaxorka](https://github.com/belomaxorka)) - Fixed issue with poll_users cleaning at every cron job startup [\#1390](https://github.com/torrentpier/torrentpier/pull/1390) ([belomaxorka](https://github.com/belomaxorka)) - Used hashing for filenames generation [\#1385](https://github.com/torrentpier/torrentpier/pull/1385) ([belomaxorka](https://github.com/belomaxorka)) -- Minor improvements [\#1382](https://github.com/torrentpier/torrentpier/pull/1382), [\#1383](https://github.com/torrentpier/torrentpier/pull/1383) ([belomaxorka](https://github.com/belomaxorka)) +- Minor improvements [\#1382](https://github.com/torrentpier/torrentpier/pull/1382), [\#1383](https://github.com/torrentpier/torrentpier/pull/1383), [\#1391](https://github.com/torrentpier/torrentpier/pull/1391) ([belomaxorka](https://github.com/belomaxorka)) - Some bugfixes [\#1380](https://github.com/torrentpier/torrentpier/pull/1380) ([belomaxorka](https://github.com/belomaxorka)) - New Crowdin updates [\#1384](https://github.com/torrentpier/torrentpier/pull/1384) ([Exileum](https://github.com/Exileum)) diff --git a/library/language/source/main.php b/library/language/source/main.php index beadde838..0ca5f8167 100644 --- a/library/language/source/main.php +++ b/library/language/source/main.php @@ -1321,6 +1321,7 @@ $lang['NEVER'] = 'Never'; //mpd $lang['DELETE_POSTS'] = 'Delete selected posts'; $lang['DELETE_POSTS_SUCCESFULLY'] = 'The selected posts have been successfully removed'; +$lang['NO_POSTS_REMOVED'] = 'No posts were removed.'; //ts $lang['TOPICS_ANNOUNCEMENT'] = 'Announcements'; diff --git a/modcp.php b/modcp.php index 81bcd2a87..8532b624e 100644 --- a/modcp.php +++ b/modcp.php @@ -132,8 +132,6 @@ if ($topic_id) { // Start session management $user->session_start(['req_login' => true]); -set_die_append_msg($forum_id, $topic_id); - // Check if user did or did not confirm. If they did not, forward them to the last page they were on if (isset($_POST['cancel']) || IS_GUEST) { $redirect = 'index.php'; @@ -237,7 +235,7 @@ switch ($mode) { $datastore->update('network_news'); } - $msg = ($result) ? $lang['TOPICS_REMOVED'] : $lang['NO_TOPICS_REMOVED']; + $msg = $result ? $lang['TOPICS_REMOVED'] : $lang['NO_TOPICS_REMOVED']; bb_die(return_msg_mcp($msg)); } else { print_confirmation([ @@ -268,7 +266,7 @@ switch ($mode) { $datastore->update('network_news'); } - $msg = ($result) ? $lang['TOPICS_MOVED'] : $lang['NO_TOPICS_MOVED']; + $msg = $result ? $lang['TOPICS_MOVED'] : $lang['NO_TOPICS_MOVED']; bb_die(return_msg_mcp($msg)); } else { if (IS_ADMIN) { @@ -518,7 +516,7 @@ switch ($mode) { // Delete posts $result = \TorrentPier\Legacy\Admin\Common::post_delete(explode(',', $post_id_sql)); - $msg = ($result) ? $lang['DELETE_POSTS_SUCCESFULLY'] : 'No posts were removed'; + $msg = $result ? $lang['DELETE_POSTS_SUCCESFULLY'] : $lang['NO_POSTS_REMOVED']; bb_die(return_msg_mcp($msg)); } else { $sql = "SELECT u.username, p.*, pt.post_text, p.post_username