0) { $threadall = C::t('forum_thread')->fetch_all_by_tid($cron_publish_ids); foreach ($cron_publish_ids as $tid) { if(!$threadall[$tid]) { unset($cron_publish_ids[$tid]); $dataChanged = true; } } foreach ($threadall as $stid=>$sdata) { if ($sdata['dateline'] <= getglobal('timestamp')) { threadpubsave($stid, true); unset($cron_publish_ids[$stid]); $dataChanged = true; } } if ($dataChanged === true) { $newcronpublish = serialize($cron_publish_ids); savecache('cronpublish', $newcronpublish); } } ?>