developpez.com
09-14-2007, 05:37 PM
Hello !
I try to delete post in a cron "/includes/cron/file.php"
i find this code in cleanup.php :
// delete expired thread redirects
$threads = $vbulletin->db->query_read("
SELECT threadid
FROM " . TABLE_PREFIX . "threadredirect
WHERE expires < " . TIMENOW . "
");
while ($thread = $vbulletin->db->fetch_array($threads))
{
$thread['open'] = 10;
$threadman =& datamanager_init('Thread', $vbulletin, ERRTYPE_SILENT, 'threadpost');
$threadman->set_existing($thread);
$threadman->delete(false, true, NULL, false);
unset($threadman);
}
how can i do the same thing for the post ?
i can't find any documentation on the datamanager for post delete ...
Best reguards !!
I try to delete post in a cron "/includes/cron/file.php"
i find this code in cleanup.php :
// delete expired thread redirects
$threads = $vbulletin->db->query_read("
SELECT threadid
FROM " . TABLE_PREFIX . "threadredirect
WHERE expires < " . TIMENOW . "
");
while ($thread = $vbulletin->db->fetch_array($threads))
{
$thread['open'] = 10;
$threadman =& datamanager_init('Thread', $vbulletin, ERRTYPE_SILENT, 'threadpost');
$threadman->set_existing($thread);
$threadman->delete(false, true, NULL, false);
unset($threadman);
}
how can i do the same thing for the post ?
i can't find any documentation on the datamanager for post delete ...
Best reguards !!