build/commands/lite/protected/controllers/PostController.php
public function actionDelete()
	{
		if(Yii::app()->request->isPostRequest)
		{
			// we only allow deletion via POST request
			$this->loadPost()->delete();
			$this->redirect(array('list'));
		}
		else
			throw new CHttpException(500,'Invalid request. Please do not repeat this request again.');
	}
public function actionDelete()
	{
		if(Yii::app()->request->isPostRequest)
		{
			// we only allow deletion via POST request
			$this->loadPost()->delete();
			$this->redirect(array('list'));
		}
		else
			throw new CHttpException(500,'Invalid request. Please do not repeat this request again.');
	}
public function actionDelete ( ) { if ( Yii :: app ( ) -> request -> isPostRequest ) { // we only allow deletion via POST request $ this -> loadPost ( ) -> delete ( ) ; $ this -> redirect ( array ( 'list' ) ) ; } else throw new CHttpException ( 500 , 'Invalid request. Please do not repeat this request again.' ) ; }
Deletes a particular post.
If deletion is successful, the browser will be redirected to the 'list' page.
Deletes a particular post . If deletion is successful the browser will be redirected to the list page .