PageRenderTime 9ms CodeModel.GetById 2ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/upload/includes/cron/jobs/prune_forums.php

http://torrentpier2.googlecode.com/
PHP | 15 lines | 11 code | 4 blank | 0 comment | 3 complexity | e9ef7edd483e3738dd1101057e3089a7 MD5 | raw file
 1<?php
 2
 3if (!defined('BB_ROOT')) die(basename(__FILE__));
 4
 5require_once(INC_DIR .'functions_admin.php');
 6
 7if ($bb_cfg['prune_enable'])
 8{
 9	$sql = "SELECT forum_id, prune_days FROM ". BB_FORUMS ." WHERE prune_days != 0";
10
11	foreach (DB()->fetch_rowset($sql) as $row)
12	{
13		topic_delete('prune', $row['forum_id'], (TIMENOW - 86400*$row['prune_days']));
14	}
15}