<?php
/*
* 项目: iOrange(橘子)
* 作者: 离家出走(yzxh24)
* Email: yzxh24@gmail.com
* 主页: www.iorange.cc
*/
/* vim: set ts=4 sw=4: */
class ToAction extends BbsAction
{
    public function run()
    {
        $postId = S::gp('pid', 'G', 2);
        try
        {
            $post = Posts::single()->getOne($postId);
        }
        catch (PostsException $exce)
        {
            throw new iSystemException($exce->getMessage());
        }
        
        $this->getController()->render('to', array('post' => $post));
    }
}
