mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 13:54:02 -07:00
Revert "Refactoring: Created constants for datetime values (#1648)"
This reverts commit 6eca29714a
.
This commit is contained in:
parent
6eca29714a
commit
3e9f4006c4
30 changed files with 52 additions and 58 deletions
|
@ -282,7 +282,7 @@ if (!empty($_REQUEST['postdays'])) {
|
|||
if (!empty($_POST['postdays'])) {
|
||||
$start = 0;
|
||||
}
|
||||
$min_post_time = TIME_DAY * $post_days;
|
||||
$min_post_time = TIMENOW - ($post_days * 86400);
|
||||
|
||||
$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'] < (TIME_DAY * $bb_cfg['poll_max_days']));
|
||||
$poll_time_expired = ($t_data['topic_time'] < TIMENOW - $bb_cfg['poll_max_days'] * 86400);
|
||||
$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