mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 18:48:21 -07:00
Minor fixes (#654)
* Minor fixes * Removed WTF statement * Fixed broken birthday applying in profile.php * Removed double-quotes
This commit is contained in:
parent
8685ba598d
commit
5d9955cd78
8 changed files with 17 additions and 14 deletions
|
@ -49,7 +49,6 @@ if (!$torrent) {
|
|||
|
||||
if ($torrent['poster_id'] == $userdata['user_id'] && !IS_AM) {
|
||||
if ($type == 'del_torrent' || $type == 'reg' || $type == 'unreg') {
|
||||
true;
|
||||
} else {
|
||||
$this->ajax_die($lang['ONLY_FOR_MOD']);
|
||||
}
|
||||
|
|
|
@ -68,9 +68,9 @@ switch ($field) {
|
|||
if (!empty($birthday_date['year'])) {
|
||||
if (strtotime($value) >= TIMENOW) {
|
||||
$this->ajax_die($lang['WRONG_BIRTHDAY_FORMAT']);
|
||||
} elseif (bb_date(TIMENOW, 'Y', 'false') - $birthday_date['year'] > $bb_cfg['birthday_max_age']) {
|
||||
} elseif (bb_date(TIMENOW, 'Y', false) - $birthday_date['year'] > $bb_cfg['birthday_max_age']) {
|
||||
$this->ajax_die(sprintf($lang['BIRTHDAY_TO_HIGH'], $bb_cfg['birthday_max_age']));
|
||||
} elseif (bb_date(TIMENOW, 'Y', 'false') - $birthday_date['year'] < $bb_cfg['birthday_min_age']) {
|
||||
} elseif (bb_date(TIMENOW, 'Y', false) - $birthday_date['year'] < $bb_cfg['birthday_min_age']) {
|
||||
$this->ajax_die(sprintf($lang['BIRTHDAY_TO_LOW'], $bb_cfg['birthday_min_age']));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,11 +23,13 @@ switch ($mode) {
|
|||
'stats',
|
||||
));
|
||||
|
||||
$users = [];
|
||||
|
||||
if ($stats['birthday_week_list']) {
|
||||
foreach ($stats['birthday_week_list'] as $week) {
|
||||
$html[] = profile_url($week) . ' <span class="small">(' . birthday_age($week['user_birthday']) . ')</span>';
|
||||
$users[] = profile_url($week) . ' <span class="small">(' . birthday_age($week['user_birthday']) . ')</span>';
|
||||
}
|
||||
$html = sprintf($lang['BIRTHDAY_WEEK'], $bb_cfg['birthday_check_day'], implode(', ', $html));
|
||||
$html = sprintf($lang['BIRTHDAY_WEEK'], $bb_cfg['birthday_check_day'], implode(', ', $users));
|
||||
} else {
|
||||
$html = sprintf($lang['NOBIRTHDAY_WEEK'], $bb_cfg['birthday_check_day']);
|
||||
}
|
||||
|
@ -39,11 +41,13 @@ switch ($mode) {
|
|||
'stats',
|
||||
));
|
||||
|
||||
$users = [];
|
||||
|
||||
if ($stats['birthday_today_list']) {
|
||||
foreach ($stats['birthday_today_list'] as $today) {
|
||||
$html[] = profile_url($today) . ' <span class="small">(' . birthday_age($today['user_birthday']) . ')</span>';
|
||||
$users[] = profile_url($today) . ' <span class="small">(' . birthday_age($today['user_birthday']) . ')</span>';
|
||||
}
|
||||
$html = $lang['BIRTHDAY_TODAY'] . implode(', ', $html);
|
||||
$html = $lang['BIRTHDAY_TODAY'] . implode(', ', $users);
|
||||
} else {
|
||||
$html = $lang['NOBIRTHDAY_TODAY'];
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ switch ($mode) {
|
|||
$map->createSitemap();
|
||||
}
|
||||
|
||||
$map_link = make_url('sitemap/sitemap.xml');
|
||||
$map_link = make_url(hide_bb_path(SITEMAP_DIR . '/sitemap.xml'));
|
||||
|
||||
foreach ($bb_cfg['sitemap_sending'] as $source_name => $source_link) {
|
||||
if ($map->sendSitemap($source_link, $map_link)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue