<?php
/**
 * AJAX修改表情排序
 * @author yzxh24
 *
 */
class EditDisplayOrderAction extends BaseAction
{
    public function run()
    {
        $value = intval(Yii::app()->request->getQuery('value'));
        $id = intval(Yii::app()->request->getQuery('id'));
        $smile = Smiles::model()->findByPk($id);
        if (empty($smile))
        {
            echo '不存在的表情';
            Yii::app()->end();
        }
        $smile->displayorder = $value;
        $smile->save();
        Yii::app()->end();
    }
}