I have a controller that calls an insert to a model then redirects to a view (CGridView)
Works great.
I have another function that is essentially identical but does not redirect. The function performs an update of the model gets called using updateAll($criteria) and works fine, but the redirect never happens. If I comment out the update, the redirect does occur.
Here is my controller code.
public function actionCreateReviewlist($id) {
PartnerSite::model()->createReviewList($id);
$model = new PartnerSite('search');
$model->unsetAttributes();
if (isset($_GET['PartnerSite']))
$model->setAttributes($_GET['PartnerSite']);
$this->render('reviewlist', array(
'model' => $model, 'partner_id' => $id,
));
}
public function actionReviewlist($id) {
$model = new PartnerSite('search');
$model->unsetAttributes();
if (isset($_GET['PartnerSite']))
$model->setAttributes($_GET['PartnerSite']);
$this->render('reviewlist', array(
'model' => $model, 'partner_id' => $id,
));
}
public function actionReleaseNew($id) {
PartnerSite::model()->releaseNew($id);
$model = new PartnerSite('search');
$model->unsetAttributes();
if (isset($_GET['PartnerSite']))
$model->setAttributes($_GET['PartnerSite']);
$this->render('reviewlist', array(
'model' => $model, 'partner_id' => $id,
));
// $this->redirect(array('blacklist','id'=>$id));
}