diff --git a/CHANGELOG.md b/CHANGELOG.md index cbb8a47b0..785140962 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ - Some reported bugfixes [\#1214](https://github.com/torrentpier/torrentpier/pull/1214) ([belomaxorka](https://github.com/belomaxorka)) - Minor improvements [\#1215](https://github.com/torrentpier/torrentpier/pull/1215), [\#1217](https://github.com/torrentpier/torrentpier/pull/1217), [\#1219](https://github.com/torrentpier/torrentpier/pull/1219), [\#1220](https://github.com/torrentpier/torrentpier/pull/1220) ([belomaxorka](https://github.com/belomaxorka)) - Fixed extensions issue [\#1218](https://github.com/torrentpier/torrentpier/pull/1218) ([belomaxorka](https://github.com/belomaxorka)) +- Fixed broken sorting in group.php [\#1221](https://github.com/torrentpier/torrentpier/pull/1221) ([belomaxorka](https://github.com/belomaxorka)) ## [v2.4.0-rc2](https://github.com/torrentpier/torrentpier/tree/v2.4.0-rc2) (2023-12-12) [Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.4.0-rc1...v2.4.0-rc2) diff --git a/group.php b/group.php index bb918aa0f..0b647e7e3 100644 --- a/group.php +++ b/group.php @@ -385,11 +385,13 @@ if (!$group_id) { 'MOD_AVATAR' => $moderator_info['avatar'], 'MOD_FROM' => $moderator_info['from'], 'MOD_JOINED' => $moderator_info['joined'], + 'MOD_JOINED_RAW' => $moderator_info['joined_raw'], 'MOD_POSTS' => $moderator_info['posts'], 'MOD_PM' => $moderator_info['pm'], 'MOD_EMAIL' => $moderator_info['email'], 'MOD_WWW' => $moderator_info['www'], 'MOD_TIME' => !empty($group_info['mod_time']) ? sprintf('%s (%s)', bb_date($group_info['mod_time']), delta_time($group_info['mod_time'])) : $lang['NONE'], + 'MOD_TIME_RAW' => !empty($group_info['mod_time']) ? $group_info['mod_time'] : '', 'U_SEARCH_USER' => 'search.php?mode=searchuser', 'U_SEARCH_RELEASES' => "tracker.php?srg=$group_id", 'U_GROUP_RELEASES' => GROUP_URL . $group_id . "&view=releases", @@ -518,12 +520,14 @@ if (!$group_id) { 'AVATAR_IMG' => $member_info['avatar'], 'FROM' => $member_info['from'], 'JOINED' => $member_info['joined'], + 'JOINED_RAW' => $member_info['joined_raw'], 'POSTS' => $member_info['posts'], 'USER_ID' => $user_id, 'PM' => $member_info['pm'], 'EMAIL' => $member_info['email'], 'WWW' => $member_info['www'], - 'TIME' => $member_info['user_time'] + 'TIME' => $member_info['user_time'], + 'TIME_RAW' => $member_info['user_time_raw'] ]); if ($is_moderator) { @@ -572,6 +576,7 @@ if (!$group_id) { 'USER' => profile_url($pending_info), 'FROM' => $pending_info['from'], 'JOINED' => $pending_info['joined'], + 'JOINED_RAW' => $pending_info['joined_raw'], 'POSTS' => $pending_info['posts'], 'USER_ID' => $user_id, 'PM' => $pending_info['pm'], diff --git a/library/includes/functions.php b/library/includes/functions.php index f0bbb6d10..fe2ff86b9 100644 --- a/library/includes/functions.php +++ b/library/includes/functions.php @@ -811,7 +811,7 @@ function generate_user_info($row, bool $have_auth = IS_ADMIN): array $www = $lang['NOSELECT']; } - return ['from' => $from, 'joined' => $joined, 'posts' => $posts, 'pm' => $pm, 'avatar' => $avatar, 'user_time' => $user_time, 'email' => $email, 'www' => $www]; + return ['from' => $from, 'joined' => $joined, 'joined_raw' => $row['user_regdate'], 'posts' => $posts, 'pm' => $pm, 'avatar' => $avatar, 'user_time' => $user_time, 'user_time_raw' => $row['user_time'], 'email' => $email, 'www' => $www]; } function get_bt_userdata($user_id) diff --git a/library/language/source/main.php b/library/language/source/main.php index d70b4cad0..2e6b0b753 100644 --- a/library/language/source/main.php +++ b/library/language/source/main.php @@ -532,7 +532,6 @@ $lang['SEARCH_USER_TOPICS'] = 'Find user topics'; // Find all topics by username $lang['NO_USER_ID_SPECIFIED'] = 'Sorry, but that user does not exist.'; $lang['WRONG_PROFILE'] = 'You cannot modify a profile that is not your own.'; -$lang['ONLY_ONE_AVATAR'] = 'Only one type of avatar can be specified'; $lang['FILE_NO_DATA'] = 'The file at the URL you gave contains no data'; $lang['NO_CONNECTION_URL'] = 'A connection could not be made to the URL you gave'; $lang['INCOMPLETE_URL'] = 'The URL you entered is incomplete'; diff --git a/search.php b/search.php index 5e5d88ecc..e837ef770 100644 --- a/search.php +++ b/search.php @@ -816,6 +816,7 @@ else { 'TOPIC_AUTHOR' => profile_url(array('username' => $topic['first_username'], 'user_id' => $topic['first_user_id'], 'user_rank' => $topic['first_user_rank'])), 'LAST_POSTER' => profile_url(array('username' => $topic['last_username'], 'user_id' => $topic['last_user_id'], 'user_rank' => $topic['last_user_rank'])), 'LAST_POST_TIME' => bb_date($topic['topic_last_post_time']), + 'LAST_POST_TIME_RAW' => $topic['topic_last_post_time'], 'LAST_POST_ID' => $topic['topic_last_post_id'], )); } diff --git a/styles/templates/default/group.tpl b/styles/templates/default/group.tpl index e414df371..08ed74d9d 100644 --- a/styles/templates/default/group.tpl +++ b/styles/templates/default/group.tpl @@ -141,7 +141,7 @@ {L_JOINED} {L_POSTS_SHORT} {L_WEBSITE} - {L_EFFECTIVE_DATE} + {L_EFFECTIVE_DATE} # @@ -154,10 +154,10 @@ {MOD_PM} {MOD_EMAIL} {MOD_FROM} - {MOD_JOINED} + {MOD_JOINED_RAW}{MOD_JOINED} {MOD_POSTS} {MOD_WWW} - {MOD_TIME} + {MOD_TIME_RAW}{MOD_TIME}   @@ -173,10 +173,10 @@ {member.PM} {member.EMAIL} {member.FROM} - {member.JOINED} + {member.JOINED_RAW}{member.JOINED} {member.POSTS} {member.WWW} - {member.TIME} + {member.TIME_RAW}{member.TIME} @@ -253,7 +253,7 @@ {pending.PM} {pending.EMAIL} {pending.FROM} - {pending.JOINED} + {pending.JOINED_RAW}{pending.JOINED} {pending.POSTS} {pending.WWW} diff --git a/styles/templates/default/search_results.tpl b/styles/templates/default/search_results.tpl index 47b02cd6a..04096d93f 100644 --- a/styles/templates/default/search_results.tpl +++ b/styles/templates/default/search_results.tpl @@ -152,7 +152,7 @@ function show_edit_options () {L_TOPICS} {L_AUTHOR} {L_REPLIES_SHORT} - {L_LASTPOST} + {L_LASTPOST} @@ -181,6 +181,7 @@ function show_edit_options () {t.TOPIC_AUTHOR} {t.REPLIES} + {t.LAST_POST_TIME_RAW}

{t.LAST_POST_TIME}

{t.LAST_POSTER}