Пример #1
0
|| # ---------------------------------------------------------------- # ||
|| # Copyright ©2000-2013 vBulletin Solutions Inc. All Rights Reserved. ||
|| # This file may not be redistributed in whole or significant part. # ||
|| # ---------------- VBULLETIN IS NOT FREE SOFTWARE ---------------- # ||
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html # ||
|| #################################################################### ||
\*======================================================================*/
// ######################## SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
if (!is_object($vbulletin->db)) {
    exit;
}
$nodes = $vbulletin->db->query_read("\n\tSELECT nodeid\n\tFROM " . TABLE_PREFIX . "cms_node\n\tWHERE \n\t\tnew = 1\n\t\t\tAND\n\t\tlastupdated < " . (TIMENOW - 3600) . "\n");
while ($node = $vbulletin->db->fetch_array($nodes)) {
    $nodeitem = new vBCms_Item_Content($node['nodeid']);
    $class = vB_Types::instance()->getContentClassFromId($nodeitem->getContentTypeID());
    $classname = $class['package'] . '_Item_Content_' . $class['class'];
    if (class_exists($classname)) {
        $nodeclass = new $classname($node['nodeid']);
    } else {
        $nodeclass = new vBCms_Item_Content($node['nodeid']);
    }
    $nodedm = $nodeclass->getDM();
    $nodedm->delete();
}
log_cron_action('', $nextitem, 1);
/*======================================================================*\
|| ####################################################################
|| # Downloaded: 03:13, Sat Sep 7th 2013
|| # CVS: $Revision: 25612 $
|| ####################################################################