diff options
Diffstat (limited to 'phpBB/viewtopic.php')
| -rw-r--r-- | phpBB/viewtopic.php | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index d8c4eb4ec0..4a145b514e 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -447,10 +447,9 @@ if (sizeof($censors)) } // Bump topic allowed? -$bump_type = (string) preg_replace('#^[0-9]+([m|h|d])$#', '\1', $config['bump_time_range']); -$bump_time = (int) preg_replace('#^([0-9]+)[m|h|d]$#', '\1', $config['bump_time_range']); -$bump_time = ($bump_type == 'm') ? $bump_time*60 : (($bump_type == 'h') ? $bump_time*3600 : $bump_time*86400); -unset($bump_type); +preg_match('#^([0-9]+)(m|h|d)$#', $config['bump_interval'], $match); +$bump_time = ($match[2] == 'm') ? $match[1] * 60 : (($match[2] == 'h') ? $match[1] * 3600 : $match[1] * 86400); +unset($match); // Send vars to template $template->assign_vars(array( |
