diff options
| author | Patrick Seeger <pseeger@ccwn.org> | 2014-05-08 14:36:06 +0200 |
|---|---|---|
| committer | Patrick Seeger <pseeger@ccwn.org> | 2014-05-08 14:36:06 +0200 |
| commit | 1605cc08545606471973f6be130afca015bb35fe (patch) | |
| tree | 0e145401b8c09e55b27ad60f28798ca6c2aa2f17 /protected/models | |
| parent | 94a8598fa257e8838e7761e0b003677c0bb908d2 (diff) | |
Ausblenden von alten Veranstaltungen und alte Dinge
Diffstat (limited to '')
| -rw-r--r-- | protected/models/Angebot.php | 8 | ||||
| -rw-r--r-- | protected/models/Veranstaltung.php | 4 |
2 files changed, 12 insertions, 0 deletions
diff --git a/protected/models/Angebot.php b/protected/models/Angebot.php index 61e4d54..c3abe92 100644 --- a/protected/models/Angebot.php +++ b/protected/models/Angebot.php @@ -103,4 +103,12 @@ class Angebot extends CActiveRecord // 'LoggableBehavior'=>'application.modules.auditTrail.behaviors.LoggableBehavior', ); } + public function scopes() + { + return array( + 'published'=>array( + 'condition'=>'1=1', + ), + ); + } }
\ No newline at end of file diff --git a/protected/models/Veranstaltung.php b/protected/models/Veranstaltung.php index 60536cf..843d430 100644 --- a/protected/models/Veranstaltung.php +++ b/protected/models/Veranstaltung.php @@ -115,6 +115,7 @@ class Veranstaltung extends CActiveRecord )); } + public function now() { @@ -155,6 +156,9 @@ class Veranstaltung extends CActiveRecord ), 'sorted'=>array( 'order'=>'startzeit ASC', + ), + 'thisYear'=>array( + 'condition'=>"startzeit > STR_TO_DATE('".Yii::app()->params['start_date']."',GET_FORMAT(DATE,'EUR'))", ), ); |
