<?php
/**
 * Created by JetBrains PhpStorm.
 * User: yzxh24
 * Date: 12-2-1
 * Time: 下午3:14
 * To change this template use File | Settings | File Templates.
 */
class SortAction extends BaseAction
{
    public function run()
    {
        $from = Yii::app()->request->getPost('fromid');
        $to = Yii::app()->request->getPost('toid');
        $bookId = Yii::app()->request->getQuery('id');

        Front::sortChapter($from, $to, $bookId);

        $this->getController()->redirect(array('chapters/alist','id'=>$bookId));
    }
}
