mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 13:54:02 -07:00
Refactoring: Created constants for datetime values (#1648)
* Refactoring: Created constants for datetime values * Updated * Updated * Update tracker.php * Update tracker.php * Update index.php * Update admin_log.php * Update viewtopic.php * Updated * Update Poll.php * Updated * Updated * Update viewtopic.php * Update User.php * Update privmsg.php * Update poll.php * Update tr_make_snapshot.php * Update displaying_torrent.php * Update CHANGELOG.md
This commit is contained in:
parent
4fe467e64a
commit
6eca29714a
30 changed files with 58 additions and 52 deletions
|
@ -84,7 +84,7 @@ if (!isset($_REQUEST['dosearch'])) {
|
|||
$lastvisited_list = '';
|
||||
|
||||
foreach ($lastvisited as $days) {
|
||||
$lastvisited_list .= '<option value="' . $days . '">' . delta_time((TIMENOW - 86400 * $days), TIMENOW, 'days') . '</option>';
|
||||
$lastvisited_list .= '<option value="' . $days . '">' . delta_time((TIME_DAY * $days), TIMENOW, 'days') . '</option>';
|
||||
}
|
||||
|
||||
$template->assign_vars([
|
||||
|
@ -634,7 +634,7 @@ if (!isset($_REQUEST['dosearch'])) {
|
|||
|
||||
switch ($lastvisited_type) {
|
||||
case 'in':
|
||||
$text = sprintf($lang['SEARCH_FOR_LASTVISITED_INTHELAST'], delta_time((TIMENOW - 86400 * $lastvisited_days), TIMENOW, 'days'));
|
||||
$text = sprintf($lang['SEARCH_FOR_LASTVISITED_INTHELAST'], delta_time((TIME_DAY * $lastvisited_days), TIMENOW, 'days'));
|
||||
|
||||
$total_sql .= 'SELECT COUNT(user_id) AS total
|
||||
FROM ' . BB_USERS . "
|
||||
|
@ -645,7 +645,7 @@ if (!isset($_REQUEST['dosearch'])) {
|
|||
AND u.user_id <> " . GUEST_UID;
|
||||
break;
|
||||
case 'after':
|
||||
$text = sprintf($lang['SEARCH_FOR_LASTVISITED_AFTERTHELAST'], delta_time((TIMENOW - 86400 * $lastvisited_days), TIMENOW, 'days'));
|
||||
$text = sprintf($lang['SEARCH_FOR_LASTVISITED_AFTERTHELAST'], delta_time((TIME_DAY * $lastvisited_days), TIMENOW, 'days'));
|
||||
|
||||
$total_sql .= 'SELECT COUNT(user_id) AS total
|
||||
FROM ' . BB_USERS . "
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue