Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Commit

Permalink
Улучшена проверка
Browse files Browse the repository at this point in the history
  • Loading branch information
langovoi committed Oct 20, 2014
1 parent f622ad4 commit 9241e78
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions controllers/GroupinviteController.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function actionIndex()

public function actionAccept($id)
{
if (!($model = Invite::model()->findByPk($id)))
if (!($model = Invite::model()->findByPk($id)) || $model->status != Invite::INVITE_CREATE)
throw new CHttpException(404);
$mail = new YiiMailer();
$mail->setView('invite/accept');
Expand All @@ -60,7 +60,7 @@ public function actionAccept($id)

public function actionDecline($id)
{
if (!($model = Invite::model()->findByPk($id)))
if (!($model = Invite::model()->findByPk($id)) || $model->status != Invite::INVITE_CREATE)
throw new CHttpException(404);
$mail = new YiiMailer();
$mail->setView('invite/decline');
Expand Down

0 comments on commit 9241e78

Please sign in to comment.