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
|
@ -282,7 +282,7 @@ if (!empty($_REQUEST['postdays'])) {
|
|||
if (!empty($_POST['postdays'])) {
|
||||
$start = 0;
|
||||
}
|
||||
$min_post_time = TIMENOW - ($post_days * 86400);
|
||||
$min_post_time = TIME_DAY * $post_days;
|
||||
|
||||
$sql = "SELECT COUNT(p.post_id) AS num_posts
|
||||
FROM " . BB_TOPICS . " t, " . BB_POSTS . " p
|
||||
|
@ -446,7 +446,7 @@ $sel_post_order_ary = [
|
|||
];
|
||||
|
||||
$topic_has_poll = $t_data['topic_vote'];
|
||||
$poll_time_expired = ($t_data['topic_time'] < TIMENOW - $bb_cfg['poll_max_days'] * 86400);
|
||||
$poll_time_expired = ($t_data['topic_time'] < (TIME_DAY * $bb_cfg['poll_max_days']));
|
||||
$can_manage_poll = ($t_data['topic_poster'] == $userdata['user_id'] || $is_auth['auth_mod']);
|
||||
$can_add_poll = ($can_manage_poll && !$topic_has_poll && !$poll_time_expired && !$start);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue