summaryrefslogtreecommitdiff
path: root/protected/controllers/MyAngebotController.php
diff options
context:
space:
mode:
Diffstat (limited to 'protected/controllers/MyAngebotController.php')
-rw-r--r--protected/controllers/MyAngebotController.php6
1 files changed, 5 insertions, 1 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"));