diff options
Diffstat (limited to 'protected/models')
| -rw-r--r-- | protected/models/Veranstaltung.php | 1 | ||||
| -rw-r--r-- | protected/models/Verein.php | 19 |
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', |
