function post($PostID, $RevisionID = null, $Slug = NULL) { $this->output->cache(30); $Post = new mBlogPost($PostID); if (empty($RevisionID)) { $Published = $Post->published; } else { $Published = new mBlogPostRevision($RevisionID); } if (!$Post->is_loaded() || !$Published->is_loaded()) { redirect('/blog/notfound'); } data('Post', $Post); data('Published', $Published); data('MetaDescription', $Published->metadesc); $this->display('post'); }