diff options
Diffstat (limited to 'protected/controllers')
| -rw-r--r-- | protected/controllers/MyAngebotController.php | 6 | ||||
| -rw-r--r-- | protected/controllers/SiteController.php | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/protected/controllers/MyAngebotController.php b/protected/controllers/MyAngebotController.php index 0072e61..b85846e 100644 --- a/protected/controllers/MyAngebotController.php +++ b/protected/controllers/MyAngebotController.php @@ -105,7 +105,9 @@ class MyAngebotController extends Controller $model->published = true;
if (Yii::app()->request->isAjaxRequest) { - if(isset($_POST['Angebot'])) {
+ if (isset($_POST['angebot_name'])) { + $model->name = $_POST['angebot_name']; + } else if (isset($_POST['Angebot'])) {
$model->attributes = $_POST['Angebot']; if ($model->save()) { echo CJSON::encode(array(
@@ -117,6 +119,8 @@ class MyAngebotController extends Controller )); exit; } + } else { + throw new CHttpException(400); } $kategorien = Kategorie::model()->findAll(array("condition"=>"published=1"));
diff --git a/protected/controllers/SiteController.php b/protected/controllers/SiteController.php index 2ee57b9..cfb6c3c 100644 --- a/protected/controllers/SiteController.php +++ b/protected/controllers/SiteController.php @@ -30,7 +30,7 @@ class SiteController extends Controller if (!Yii::app()->user->isGuest && Yii::app()->user->isAdmin) { $this->redirect(array("/verein/index")); } - $this->redirect(array("/myverein/")); + $this->redirect(array("/myVerein/")); } /** |
