function check_level($pubtype, $magic) { $this->PublishedType = $pubtype; $page_score = ($this->VoteCount * $this->VoteFactor + $this->CommentCount * $this->CommentFactor) / $this->getDaysOld(); //echo $page_score . "--" . $magic . " al:" . $this->already_published(); if ($page_score >= $magic && $this->already_published() == false) { $this->publish_page(); if ($this->UpdateRSS == true) { $rss = new RSS(); $rss->PageID = $this->PageID; $rss->StaticXML = true; $rss->published = 1; $rss->update_rss_page_categories(); } } else { if ($this->already_published() == true) { //$this->unpublish_page(); /*echo "test rss"; $rss = new RSS(); $rss->PageID = $this->PageID; $rss->StaticXML = true; $rss->published = 1; $rss->update_rss_page_categories(); */ } } }