Hey, I'm wondering what file(s) actually handle auto-pruning in v2.2 (or rather 2.1)?
I'm mainly just curious to see how phpBB is currently doing this, as php doesn't seem to be all that good a language for scheduling things like automatic forum pruning and the like.
Auto-pruning in 2.2
Forum rules
Discussion of general topics related to the new release and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
Discussion of general topics related to the new release and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
Auto-pruning in 2.2
Images in sigs! please.
-
- Registered User
- Posts: 90
- Joined: Tue Apr 15, 2003 5:46 am
- Location: Northwest Indiana
- Contact:
Re: Auto-pruning in 2.2
I found this in viewforum.php
Code: Select all
// Do the forum Prune thang - cron type job ...
if ($forum_data['prune_next'] < time() && $forum_data['enable_prune'])
{
include_once($phpbb_root_path . 'includes/functions_admin.'.$phpEx);
if ($forum_data['prune_days'])
{
auto_prune($forum_id, 'posted', $forum_data['forum_flags'], $forum_data['prune_days'], $forum_data['prune_freq']);
}
if ($forum_data['prune_viewed'])
{
auto_prune($forum_id, 'viewed', $forum_data['forum_flags'], $forum_data['prune_viewed'], $forum_data['prune_freq']);
}
}
Re: Auto-pruning in 2.2
As it stands at present (and in 2.0.x) the auto-pruning does not run on an exact schedule, but rather it runs on the next page view of the relevant script after the time it should run using a test (as above) to determine if it should run or not.