summaryrefslogtreecommitdiff
path: root/protected/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'protected/controllers')
-rw-r--r--protected/controllers/SearchController.php4
-rw-r--r--protected/controllers/StandortController.php5
-rw-r--r--protected/controllers/VeranstaltungController.php17
3 files changed, 20 insertions, 6 deletions
diff --git a/protected/controllers/SearchController.php b/protected/controllers/SearchController.php
index 2cf87df..1dd2414 100644
--- a/protected/controllers/SearchController.php
+++ b/protected/controllers/SearchController.php
@@ -2,7 +2,7 @@
class SearchController extends Controller
{
- public static $Searchables = array('Verein' => array('beschreibung'),'Sitecontent'=>array('content'));
+ public static $Searchables = array('Verein' => array('beschreibung'),'Sitecontent'=>array('content','title'));
public function actionIndex()
{
$this->render('index');
@@ -14,7 +14,7 @@ class SearchController extends Controller
foreach (SearchController::$Searchables as $searchable => $columns) {
$q = new CDbCriteria();
foreach ($columns as $col) {
- $q->addSearchCondition($col,$_POST['search']);
+ $q->addSearchCondition($col,$_POST['search'],true,'OR');
}
$results[$searchable]=CActiveRecord::model($searchable)->findAll($q);
}
diff --git a/protected/controllers/StandortController.php b/protected/controllers/StandortController.php
index 3fa11df..59e0ca5 100644
--- a/protected/controllers/StandortController.php
+++ b/protected/controllers/StandortController.php
@@ -27,10 +27,11 @@ class StandortController extends Controller
{
return array(
array('allow', // allow admin user to perform 'admin' and 'delete' actions
- 'actions'=>array('delete','create','update','index','view','ajaxupdate','ajaxcreate','savecoords'),
- 'users'=>array('admin'),
+ 'actions'=>array('index','view'),
+ 'users'=>array('*'),
),
array('deny', // deny all users
+ 'actions'=>array('delete','create','update','ajaxupdate','ajaxcreate','savecoords'),
'users'=>array('*'),
),
);
diff --git a/protected/controllers/VeranstaltungController.php b/protected/controllers/VeranstaltungController.php
index 49ec10a..0e88513 100644
--- a/protected/controllers/VeranstaltungController.php
+++ b/protected/controllers/VeranstaltungController.php
@@ -27,8 +27,8 @@ class VeranstaltungController extends Controller
{
return array(
array('allow', // allow admin user to perform 'admin' and 'delete' actions
- 'actions'=>array('create','update','index','view','delete'),
- 'users'=>array('admin'),
+ 'actions'=>array('index','view','now'),
+ 'users'=>array('*'),
),
array('deny', // deny all users
'users'=>array('*'),
@@ -141,6 +141,19 @@ class VeranstaltungController extends Controller
));
}
+ public function actionNow()
+ {
+ $model=new Veranstaltung('now');
+ $model->unsetAttributes(); // clear any default values
+ if(isset($_GET['Veranstaltung']))
+ $model->attributes=$_GET['Veranstaltung'];
+
+ $this->render('now',array(
+ 'model'=>$model,
+ ));
+
+ }
+
/**
* Returns the data model based on the primary key given in the GET variable.
* If the data model is not found, an HTTP exception will be raised.