Used declensions for days in some cases (#1310)

* Minor improvements

* Update admin_forums.php

* Updated

* Updated

* Updated
This commit is contained in:
Roman Kelesidis 2024-01-06 21:57:41 +07:00 committed by GitHub
commit 489c02aea1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 7 deletions

View file

@ -433,6 +433,7 @@ if ($mode) {
if ($to_id == -1) {
// Delete everything from forum
\TorrentPier\Legacy\Admin\Common::topic_delete('prune', $from_id, 0, true);
$datastore->update('stats');
} else {
// Move all posts
$sql = 'SELECT * FROM ' . BB_FORUMS . " WHERE forum_id IN($from_id, $to_id)";
@ -472,7 +473,6 @@ if ($mode) {
fix_orphan_sf();
\TorrentPier\Legacy\Group::update_user_level('all');
$datastore->update('cat_forums');
$datastore->update('stats');
CACHE('bb_cache')->rm();
bb_die($lang['FORUMS_UPDATED'] . '<br /><br />' . sprintf($lang['CLICK_RETURN_FORUMADMIN'], '<a href="admin_forums.php">', '</a>') . '<br /><br />' . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '<a href="index.php?pane=right">', '</a>'));
@ -739,7 +739,7 @@ if (!$mode || $show_main_page) {
'FORUM_DESC' => htmlCHR($forum_rows[$j]['forum_desc']),
'NUM_TOPICS' => $forum_rows[$j]['forum_topics'],
'NUM_POSTS' => $forum_rows[$j]['forum_posts'],
'PRUNE_DAYS' => $forum_rows[$j]['prune_days'] ?: '-',
'PRUNE_DAYS' => !empty($forum_rows[$j]['prune_days']) ? delta_time((TIMENOW - 86400 * $forum_rows[$j]['prune_days']), TIMENOW, 'days') : '-',
'ORDER' => $forum_rows[$j]['forum_order'],
'FORUM_ID' => $forum_rows[$j]['forum_id'],

View file

@ -85,7 +85,7 @@ if (!isset($_REQUEST['dosearch'])) {
$lastvisited_list = '';
foreach ($lastvisited as $days) {
$lastvisited_list .= '<option value="' . $days . '">' . $days . ' ' . (($days > 1) ? $lang['DAYS'] : $lang['DAY']) . '</option>';
$lastvisited_list .= '<option value="' . $days . '">' . delta_time((TIMENOW - 86400 * $days), TIMENOW, 'days') . '</option>';
}
$template->assign_vars([
@ -635,7 +635,7 @@ if (!isset($_REQUEST['dosearch'])) {
switch ($lastvisited_type) {
case 'in':
$text = sprintf($lang['SEARCH_FOR_LASTVISITED_INTHELAST'], $lastvisited_days, (($lastvisited_days > 1) ? $lang['DAYS'] : $lang['DAY']));
$text = sprintf($lang['SEARCH_FOR_LASTVISITED_INTHELAST'], delta_time((TIMENOW - 86400 * $lastvisited_days), TIMENOW, 'days'));
$total_sql .= 'SELECT COUNT(user_id) AS total
FROM ' . BB_USERS . "
@ -646,7 +646,7 @@ if (!isset($_REQUEST['dosearch'])) {
AND u.user_id <> " . GUEST_UID;
break;
case 'after':
$text = sprintf($lang['SEARCH_FOR_LASTVISITED_AFTERTHELAST'], $lastvisited_days, (($lastvisited_days > 1) ? $lang['DAYS'] : $lang['DAY']));
$text = sprintf($lang['SEARCH_FOR_LASTVISITED_AFTERTHELAST'], delta_time((TIMENOW - 86400 * $lastvisited_days), TIMENOW, 'days'));
$total_sql .= 'SELECT COUNT(user_id) AS total
FROM ' . BB_USERS . "

View file

@ -2626,8 +2626,8 @@ $lang['SEARCH_FOR_USERFIELD_WEBSITE'] = 'Searching for users with an Website mat
$lang['SEARCH_FOR_USERFIELD_LOCATION'] = 'Searching for users with a Location matching %s';
$lang['SEARCH_FOR_USERFIELD_INTERESTS'] = 'Searching for users with their Interests field matching %s';
$lang['SEARCH_FOR_USERFIELD_OCCUPATION'] = 'Searching for users with their Occupation field matching %s';
$lang['SEARCH_FOR_LASTVISITED_INTHELAST'] = 'Searching for users who have visited in the last %s %s';
$lang['SEARCH_FOR_LASTVISITED_AFTERTHELAST'] = 'Searching for users who have visited after the last %s %s';
$lang['SEARCH_FOR_LASTVISITED_INTHELAST'] = 'Searching for users who have visited in the last %s';
$lang['SEARCH_FOR_LASTVISITED_AFTERTHELAST'] = 'Searching for users who have visited after the last %s';
$lang['SEARCH_FOR_LANGUAGE'] = 'Searching for users who have set %s as their language';
$lang['SEARCH_FOR_TIMEZONE'] = 'Searching for users who have set UTC %s as their timezone';
$lang['SEARCH_FOR_STYLE'] = 'Searching for users who have set %s as their style';