diff --git a/CHANGELOG.md b/CHANGELOG.md index 86acd7fc..27e0cd17 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,7 +19,7 @@ - Added missing translation in admin_ug_auth [\#254](https://github.com/torrentpier/torrentpier-lts/pull/254) ([belomaxorka](https://github.com/belomaxorka)) - Support for IDN domains [\#252](https://github.com/torrentpier/torrentpier-lts/pull/252) ([belomaxorka](https://github.com/belomaxorka), [kovalensky](https://github.com/kovalensky)) - Fixed cache directory auto-creating with SQLite [\#247](https://github.com/torrentpier/torrentpier-lts/pull/247) ([belomaxorka](https://github.com/belomaxorka)) -- Minor improvements [\#245](https://github.com/torrentpier/torrentpier-lts/pull/245), [\#246](https://github.com/torrentpier/torrentpier-lts/pull/246), [\#248](https://github.com/torrentpier/torrentpier-lts/pull/248), [\#249](https://github.com/torrentpier/torrentpier-lts/pull/249), [\#250](https://github.com/torrentpier/torrentpier-lts/pull/250), [\#251](https://github.com/torrentpier/torrentpier-lts/pull/251), [\#253](https://github.com/torrentpier/torrentpier-lts/pull/253), [\#255](https://github.com/torrentpier/torrentpier-lts/pull/255), [\#256](https://github.com/torrentpier/torrentpier-lts/pull/256), [\#257](https://github.com/torrentpier/torrentpier-lts/pull/257), [\#258](https://github.com/torrentpier/torrentpier-lts/pull/258), [\#259](https://github.com/torrentpier/torrentpier-lts/pull/259), [\#261](https://github.com/torrentpier/torrentpier-lts/pull/261), [\#262](https://github.com/torrentpier/torrentpier-lts/pull/262), [\#263](https://github.com/torrentpier/torrentpier-lts/pull/263), [\#264](https://github.com/torrentpier/torrentpier-lts/pull/264), [\#265](https://github.com/torrentpier/torrentpier-lts/pull/265), [\#266](https://github.com/torrentpier/torrentpier-lts/pull/266), [\#267](https://github.com/torrentpier/torrentpier-lts/pull/267), [\#268](https://github.com/torrentpier/torrentpier-lts/pull/268), [\#269](https://github.com/torrentpier/torrentpier-lts/pull/269), [\#270](https://github.com/torrentpier/torrentpier-lts/pull/270), [\#271](https://github.com/torrentpier/torrentpier-lts/pull/271), [\#273](https://github.com/torrentpier/torrentpier-lts/pull/273), [\#275](https://github.com/torrentpier/torrentpier-lts/pull/275), [\#280](https://github.com/torrentpier/torrentpier-lts/pull/280), [\#281](https://github.com/torrentpier/torrentpier-lts/pull/281), [\#287](https://github.com/torrentpier/torrentpier-lts/pull/287) ([belomaxorka](https://github.com/belomaxorka)) +- Minor improvements [\#245](https://github.com/torrentpier/torrentpier-lts/pull/245), [\#246](https://github.com/torrentpier/torrentpier-lts/pull/246), [\#248](https://github.com/torrentpier/torrentpier-lts/pull/248), [\#249](https://github.com/torrentpier/torrentpier-lts/pull/249), [\#250](https://github.com/torrentpier/torrentpier-lts/pull/250), [\#251](https://github.com/torrentpier/torrentpier-lts/pull/251), [\#253](https://github.com/torrentpier/torrentpier-lts/pull/253), [\#255](https://github.com/torrentpier/torrentpier-lts/pull/255), [\#256](https://github.com/torrentpier/torrentpier-lts/pull/256), [\#257](https://github.com/torrentpier/torrentpier-lts/pull/257), [\#258](https://github.com/torrentpier/torrentpier-lts/pull/258), [\#259](https://github.com/torrentpier/torrentpier-lts/pull/259), [\#261](https://github.com/torrentpier/torrentpier-lts/pull/261), [\#262](https://github.com/torrentpier/torrentpier-lts/pull/262), [\#263](https://github.com/torrentpier/torrentpier-lts/pull/263), [\#264](https://github.com/torrentpier/torrentpier-lts/pull/264), [\#265](https://github.com/torrentpier/torrentpier-lts/pull/265), [\#266](https://github.com/torrentpier/torrentpier-lts/pull/266), [\#267](https://github.com/torrentpier/torrentpier-lts/pull/267), [\#268](https://github.com/torrentpier/torrentpier-lts/pull/268), [\#269](https://github.com/torrentpier/torrentpier-lts/pull/269), [\#270](https://github.com/torrentpier/torrentpier-lts/pull/270), [\#271](https://github.com/torrentpier/torrentpier-lts/pull/271), [\#273](https://github.com/torrentpier/torrentpier-lts/pull/273), [\#275](https://github.com/torrentpier/torrentpier-lts/pull/275), [\#280](https://github.com/torrentpier/torrentpier-lts/pull/280), [\#281](https://github.com/torrentpier/torrentpier-lts/pull/281), [\#287](https://github.com/torrentpier/torrentpier-lts/pull/287), [\#290](https://github.com/torrentpier/torrentpier-lts/pull/290) ([belomaxorka](https://github.com/belomaxorka)) ## [v2.1.5-2023.08-HotFix](https://github.com/torrentpier/torrentpier-lts/tree/v2.1.5-2023.08-HotFix) (2023-09-17) [Full Changelog](https://github.com/torrentpier/torrentpier-lts/compare/v2.1.5-2023.08...v2.1.5-2023.08-HotFix) diff --git a/group.php b/group.php index 3227ee37..56e58fbb 100644 --- a/group.php +++ b/group.php @@ -17,9 +17,9 @@ function generate_user_info(&$row, $date_format, $group_mod, &$from, &$posts, &$ global $lang, $images, $bb_cfg; $from = (!empty($row['user_from'])) ? $row['user_from'] : $lang['NOSELECT']; - $joined = bb_date($row['user_regdate'], $bb_cfg['reg_date_format']); - $user_time = (!empty($row['user_time'])) ? bb_date($row['user_time']) : $lang['NONE']; - $posts = ($row['user_posts']) ? $row['user_posts'] : 0; + $joined = bb_date($row['user_regdate'], $date_format); + $user_time = (!empty($row['user_time'])) ? sprintf('%s (%s)', bb_date($row['user_time'], $date_format), delta_time($row['user_time'])) : $lang['NONE']; + $posts = ($row['user_posts']) ? ''. $row['user_posts'] .'' : 0; $pm = ($bb_cfg['text_buttons']) ? ''. $lang['SEND_PM_TXTB'] .'' : '' . $lang['SEND_PRIVATE_MESSAGE'] . ''; $avatar = get_avatar($row['user_id'], $row['avatar_ext_id'], !bf($row['user_opt'], 'user_opt', 'dis_avatar'), '', 50, 50); @@ -439,7 +439,7 @@ else $username = $group_moderator['username']; $user_id = $group_moderator['user_id']; - generate_user_info($group_moderator, $bb_cfg['default_dateformat'], $is_moderator, $from, $posts, $joined, $pm, $email, $www, $user_time, $avatar); + generate_user_info($group_moderator, $bb_cfg['reg_date_format'], $is_moderator, $from, $posts, $joined, $pm, $email, $www, $user_time, $avatar); $group_type = ''; if ($group_info['group_type'] == GROUP_OPEN) @@ -465,7 +465,7 @@ else 'GROUP_SIGNATURE' => bbcode2html($group_info['group_signature']), 'GROUP_AVATAR' => get_avatar(GROUP_AVATAR_MASK . $group_id, $group_info['avatar_ext_id'], true), 'GROUP_DETAILS' => $group_details, - 'GROUP_TIME' => (!empty($group_info['group_time'])) ? sprintf('%s (%s)', bb_date($group_info['group_time']), delta_time($group_info['group_time'])) : $lang['NONE'], + 'GROUP_TIME' => (!empty($group_info['group_time'])) ? sprintf('%s (%s)', bb_date($group_info['group_time'], $bb_cfg['reg_date_format']), delta_time($group_info['group_time'])) : $lang['NONE'], 'MOD_USER' => profile_url($group_moderator), 'MOD_AVATAR' => $avatar, 'MOD_FROM' => $from, @@ -474,7 +474,7 @@ else 'MOD_PM' => $pm, 'MOD_EMAIL' => $email, 'MOD_WWW' => $www, - 'MOD_TIME' => (!empty($group_info['mod_time'])) ? bb_date($group_info['mod_time']) : $lang['NONE'], + 'MOD_TIME' => (!empty($group_info['mod_time'])) ? sprintf('%s (%s)', bb_date($group_info['mod_time'], $bb_cfg['reg_date_format']), delta_time($group_info['mod_time'])) : $lang['NONE'], 'U_SEARCH_USER' => "search.php?mode=searchuser", 'U_SEARCH_RELEASES' => "tracker.php?srg=$group_id", 'U_GROUP_RELEASES' => GROUP_URL . $group_id . "&view=releases", @@ -598,7 +598,7 @@ else { $user_id = $member['user_id']; - generate_user_info($member, $bb_cfg['default_dateformat'], $is_moderator, $from, $posts, $joined, $pm, $email, $www, $user_time, $avatar); + generate_user_info($member, $bb_cfg['reg_date_format'], $is_moderator, $from, $posts, $joined, $pm, $email, $www, $user_time, $avatar); if ($group_info['group_type'] != GROUP_HIDDEN || $is_group_member || $is_moderator) { @@ -659,7 +659,7 @@ else { $user_id = $member['user_id']; - generate_user_info($member, $bb_cfg['default_dateformat'], $is_moderator, $from, $posts, $joined, $pm, $email, $www, $user_time, $avatar); + generate_user_info($member, $bb_cfg['reg_date_format'], $is_moderator, $from, $posts, $joined, $pm, $email, $www, $user_time, $avatar); $row_class = !($i % 2) ? 'row1' : 'row2'; diff --git a/library/config.php b/library/config.php index ec7cad27..717c4ade 100644 --- a/library/config.php +++ b/library/config.php @@ -383,7 +383,7 @@ define('CRON_RUNNING', TRIGGERS_DIR .'cron_running'); // Date format $bb_cfg['date_format'] = 'Y-m-d'; // общий формат даты (оставлено для обратной совместимости. Если есть возможность, то используйте лучше одну из переменных ниже, исходя из целей) $bb_cfg['current_time_date_format'] = 'd-M H:i'; // формат блока "текущее время" на сайте -$bb_cfg['reg_date_format'] = 'Y-m-d H:i'; // формат даты регистрации пользователя +$bb_cfg['reg_date_format'] = 'Y-m-d H:i'; // формат даты регистрации / даты вступления пользователя $bb_cfg['last_visit_date_format'] = 'Y-m-d H:i'; // формат даты последнего визита на сайте $bb_cfg['last_activity_date_format'] = 'Y-m-d H:i'; // формат даты последней активности на сайте $bb_cfg['last_post_date_format'] = 'd-M-y H:i'; // формат даты последнего поста (на странице просмотра форума и на главной) diff --git a/memberlist.php b/memberlist.php index 5f6a4371..3886be01 100644 --- a/memberlist.php +++ b/memberlist.php @@ -168,7 +168,7 @@ if ($result = DB()->fetch_rowset($sql)) $user_id = $row['user_id']; $from = $row['user_from']; $joined = bb_date($row['user_regdate'], $bb_cfg['reg_date_format']); - $posts = $row['user_posts']; + $posts = ''. $row['user_posts'] .''; $pm = ($bb_cfg['text_buttons']) ? ''. $lang['SEND_PM_TXTB'] .'' : '' . $lang['SEND_PRIVATE_MESSAGE'] . ''; if (bf($row['user_opt'], 'user_opt', 'user_viewemail') || IS_ADMIN) diff --git a/viewtopic.php b/viewtopic.php index 5dba3b1b..3e4cc0e9 100644 --- a/viewtopic.php +++ b/viewtopic.php @@ -789,7 +789,7 @@ for($i = 0; $i < $total_posts; $i++) 'POSTER_JOINED' => ($bb_cfg['show_poster_joined']) ? $poster_longevity : '', 'POSTER_JOINED_DATE' => $poster_joined, - 'POSTER_POSTS' => ($bb_cfg['show_poster_posts']) ? $poster_posts : '', + 'POSTER_POSTS' => ($bb_cfg['show_poster_posts']) ? ''. $poster_posts .'' : '', 'POSTER_FROM' => ($bb_cfg['show_poster_from']) ? wbr($poster_from) : '', 'POSTER_BOT' => ($poster_id == BOT_UID), 'POSTER_ID' => $poster_id,