mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 13:54:02 -07:00
Fixed $bb_cfg['pm_days_keep'] (#834)
This commit is contained in:
parent
b1403aa95b
commit
fbf5bf94f1
4 changed files with 24 additions and 1 deletions
19
library/includes/cron/jobs/clean_pm.php
Normal file
19
library/includes/cron/jobs/clean_pm.php
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
/**
|
||||
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||
*
|
||||
* @copyright Copyright (c) 2005-2023 TorrentPier (https://torrentpier.com)
|
||||
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||
*/
|
||||
|
||||
if (!defined('BB_ROOT')) {
|
||||
die(basename(__FILE__));
|
||||
}
|
||||
|
||||
$pm_days_keep = (int)$bb_cfg['pm_days_keep'];
|
||||
|
||||
DB()->query("
|
||||
DELETE FROM " . BB_PRIVMSGS . "
|
||||
WHERE privmsgs_date < " . (TIMENOW - 86400 * $pm_days_keep) . "
|
||||
");
|
Loading…
Add table
Add a link
Reference in a new issue