mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-06 16:56:44 +02:00
Additions for forum auto_pruning, and fix for form submission on edits
git-svn-id: file:///svn/phpbb/trunk@956 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -158,25 +158,23 @@ function auto_prune($forum_id = 0)
|
||||
|
||||
while($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$forum_id = $row['forum_id'];
|
||||
|
||||
$prune_date = time() - ($row['prune_days'] * $one_day);
|
||||
|
||||
$pruned = prune($forum_id, $prune_date);
|
||||
|
||||
$next_prune = time() + ($row['prune_freq'] * $one_day);
|
||||
|
||||
$sql = "UPDATE " . FORUMS_TABLE . "
|
||||
SET prune_next = $next_prune
|
||||
WHERE forum_id = $forum_id";
|
||||
if(!$db->sql_query($sql))
|
||||
if($row['prune_freq'] > 0 && $row['prune_days'] > 0)
|
||||
{
|
||||
message_die(GENERAL_ERROR, "Auto-Prune: Couldn't update forum table.", __LINE__, __FILE__);
|
||||
$forum_id = $row['forum_id'];
|
||||
$prune_date = time() - ($row['prune_days'] * $one_day);
|
||||
$pruned = prune($forum_id, $prune_date);
|
||||
$next_prune = time() + ($row['prune_freq'] * $one_day);
|
||||
$sql = "UPDATE " . FORUMS_TABLE . "
|
||||
SET prune_next = $next_prune
|
||||
WHERE forum_id = $forum_id";
|
||||
if(!$db->sql_query($sql))
|
||||
{
|
||||
message_die(GENERAL_ERROR, "Auto-Prune: Couldn't update forum table.", __LINE__, __FILE__);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
Reference in New Issue
Block a user