summaryrefslogtreecommitdiff
path: root/protected/models
diff options
context:
space:
mode:
authorPatrick Seeger <pseeger@ccwn.org>2012-06-25 23:32:25 +0200
committerPatrick Seeger <pseeger@ccwn.org>2012-06-25 23:32:25 +0200
commit66e981bd3d3f9946afed0efbcaf8efa7907c530f (patch)
treed7dcb28617055cf8690c68f79058032d00a0e6fb /protected/models
parentb938b240a36bb7098a952d1b0bf0307a24c9dc36 (diff)
Anzeige korrektur
Diffstat (limited to 'protected/models')
-rw-r--r--protected/models/Veranstaltung.php1
-rw-r--r--protected/models/Verein.php19
2 files changed, 14 insertions, 6 deletions
diff --git a/protected/models/Veranstaltung.php b/protected/models/Veranstaltung.php
index a0f1f9d..0117033 100644
--- a/protected/models/Veranstaltung.php
+++ b/protected/models/Veranstaltung.php
@@ -126,7 +126,6 @@ class Veranstaltung extends CActiveRecord
//$criteria->compare("endzeit"," <= ".$now,'AND');
$criteria->condition = '(startzeit between SUBDATE(NOW(),INTERVAL 1 HOUR) and ADDDATE(NOW(),INTERVAL 1 HOUR) OR startzeit < NOW() and endzeit > NOW() ) and endzeit > NOW() and published = 1';
$criteria->order = "startzeit ASC";
- Yii::trace(print_r($criteria,true));
return new CActiveDataProvider($this, array(
'criteria'=>$criteria,
));
diff --git a/protected/models/Verein.php b/protected/models/Verein.php
index 6d84c91..78117e0 100644
--- a/protected/models/Verein.php
+++ b/protected/models/Verein.php
@@ -105,20 +105,29 @@ class Verein extends CActiveRecord
$criteria->compare('id',$this->id);
$criteria->compare('name',$this->name,true);
- $criteria->compare('url',$this->url,true);
- $criteria->compare('bild',$this->bild,true);
$criteria->compare('email',$this->email,true);
$criteria->compare('slug',$this->slug,true);
- $criteria->compare('kontaktdaten',$this->kontaktdaten,true);
- $criteria->compare('beschreibung',$this->beschreibung,true);
$criteria->compare('standort_id',$this->standort_id);
- $criteria->compare('published',$this->published);
return new CActiveDataProvider($this, array(
'criteria'=>$criteria,
));
}
+ public function listPublic()
+ {
+
+ $criteria=new CDbCriteria;
+
+ //$criteria->compare('startzeit','> '.$nowMin);
+ //$criteria->compare('startzeit','< '.$nowPlus);
+ //$criteria->compare("endzeit"," <= ".$now,'AND');
+ $criteria->condition = 'published = 1';
+ return new CActiveDataProvider($this, array(
+ 'criteria'=>$criteria,
+ ));
+ }
+
public function behaviors() {
return array(
// 'LoggableBehavior'=>'application.modules.auditTrail.behaviors.LoggableBehavior',