function PruneNews() { $story = new nw_NewsStory(); $timestamp=intval($_POST['prune_date']); $expired= intval($_POST['expired']); $topiclist=''; if(isset($_POST['pruned_topics'])) { $topiclist=$_POST['pruned_topics']; } if(intval($_POST['ok'])==1) { $story = new nw_NewsStory(); xoops_cp_header(); $count=$story->GetCountStoriesPublishedBefore($timestamp,$expired,$topiclist); $msg=sprintf(_AM_NW_PRUNE_DELETED,$count); $story->DeleteBeforeDate($timestamp,$expired,$topiclist); unset($story); nw_updateCache(); redirect_header( 'index.php', 3, $msg); } }