Minor improvements (#906)

This commit is contained in:
Roman Kelesidis 2023-09-19 17:00:17 +07:00 committed by GitHub
commit 34fd7ba2f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 26 additions and 15 deletions

View file

@ -13,7 +13,6 @@ if (!defined('BB_ROOT')) {
$pm_days_keep = (int)$bb_cfg['pm_days_keep'];
DB()->query("
DELETE FROM " . BB_PRIVMSGS . "
WHERE privmsgs_date < " . (TIMENOW - 86400 * $pm_days_keep) . "
");
if ($pm_days_keep !== 0) {
DB()->query("DELETE FROM " . BB_PRIVMSGS . " WHERE privmsgs_date < " . (TIMENOW - 86400 * $pm_days_keep));
}