summaryrefslogtreecommitdiff
path: root/protected/controllers
diff options
context:
space:
mode:
authorTristan Zur <tzur@ccwn.org>2012-05-18 19:03:16 +0200
committerTristan Zur <tzur@ccwn.org>2012-05-18 19:03:16 +0200
commit0567da9fd246e495345df1bdf8fc947d5fbe695d (patch)
tree8743516939a5256f45143e989ba545f268dce270 /protected/controllers
parent586e35130d97d2829620e03167797b06d7fe07f2 (diff)
- Speis & Trank (Vereine): Bedienung vereinfacht, Implementierung zur
Erstellung neuer Angebote gesäubert - SiteController: Schreibfehler in URL korrigiert - Html component: Wrapper zum registrieren von JS-Dateien hinzugefügt - main layout: Javascript-String Funktionen JS-Datei registriert
Diffstat (limited to 'protected/controllers')
-rw-r--r--protected/controllers/MyAngebotController.php6
-rw-r--r--protected/controllers/SiteController.php2
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/"));
}
/**