mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 18:48:21 -07:00
WIP: Cumulative update ☕ (#685)
* Use lang variables instead of strings * [Cache/Datastore] Use switch constructions * Removed old-style debug from SQL wrapper * Removed useless functions * Use bb_date instead of native function
This commit is contained in:
parent
cef8db9af7
commit
4ff334bb45
11 changed files with 49 additions and 103 deletions
|
@ -21,9 +21,9 @@ $bb_cfg = [];
|
|||
$bb_cfg['js_ver'] = $bb_cfg['css_ver'] = 1;
|
||||
|
||||
// Version info
|
||||
$bb_cfg['tp_version'] = '2.3.1';
|
||||
$bb_cfg['tp_release_date'] = '18-03-2023';
|
||||
$bb_cfg['tp_release_codename'] = 'Bison';
|
||||
$bb_cfg['tp_version'] = '2.4.0-dev';
|
||||
$bb_cfg['tp_release_date'] = '18-04-2023';
|
||||
$bb_cfg['tp_release_codename'] = 'Cattle';
|
||||
|
||||
// Database
|
||||
// Настройка баз данных ['db']['srv_name'] => (array) srv_cfg;
|
||||
|
|
|
@ -71,7 +71,7 @@ if ($bb_cfg['birthday_check_day'] && $bb_cfg['birthday_enabled']) {
|
|||
$birthday_today_list = $birthday_week_list = array();
|
||||
|
||||
foreach ($sql as $row) {
|
||||
$user_birthday = date('md', strtotime($row['user_birthday']));
|
||||
$user_birthday = bb_date(strtotime($row['user_birthday']), 'md', false);
|
||||
|
||||
if ($user_birthday > $date_today && $user_birthday <= $date_forward) {
|
||||
// user are having birthday within the next days
|
||||
|
|
|
@ -542,14 +542,6 @@ function url_arg($url, $arg, $value, $amp = '&')
|
|||
return $url . $anchor;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds commas between every group of thousands
|
||||
*/
|
||||
function commify($number)
|
||||
{
|
||||
return number_format($number);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a size formatted in a more human-friendly format, rounded to the nearest GB, MB, KB..
|
||||
*/
|
||||
|
@ -2140,7 +2132,7 @@ function user_birthday_icon($user_birthday, $user_id): string
|
|||
|
||||
$current_date = bb_date(TIMENOW, 'md', false);
|
||||
$user_birthday = ($user_id != GUEST_UID && !empty($user_birthday) && $user_birthday != '1900-01-01')
|
||||
? date('md', strtotime($user_birthday)) : false;
|
||||
? bb_date(strtotime($user_birthday), 'md', false) : false;
|
||||
|
||||
return ($bb_cfg['birthday_enabled'] && $current_date == $user_birthday) ? '<img src="' . $images['icon_birthday'] . '" alt="" title="' . $lang['HAPPY_BIRTHDAY'] . '" border="0" />' : '';
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue