<?php
/**
 * 删除标签
 * @author yzxh24
 * @email yzxh24@gmail.com
 * @created 2010-05-14 15:07:00
 */
class DeleteAction extends BaseAction
{
    public function run()
    {
        if(Yii::app()->request->isPostRequest)
		{
			$this->getController()->loadLabel()->delete();

			if(!isset($_GET['ajax']))
            {
				$this->getController()->redirect(array('list'));
            }
		}
		else
        {
			throw new CHttpException(400,'Invalid request. Please do not repeat this request again.');
        }
    }
}