diff options
| author | Patrick Seeger <pseeger@ccwn.org> | 2014-06-20 14:57:39 +0200 |
|---|---|---|
| committer | Patrick Seeger <pseeger@ccwn.org> | 2014-06-20 14:57:39 +0200 |
| commit | 789b6c74e6d9766b64128d20ccecc3a5a6e5e881 (patch) | |
| tree | 629692dde8993bf73e277cfcbadaff1ffe428851 /protected/models/Veranstaltung.php | |
| parent | b53f83a45b9ce727a45b374a01fa9022307a2e9f (diff) | |
Sortierung Vereine und Tageszuordnung optimiert (Freitag geht bis 2 Uhr nachts etc)
Diffstat (limited to 'protected/models/Veranstaltung.php')
| -rw-r--r-- | protected/models/Veranstaltung.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/protected/models/Veranstaltung.php b/protected/models/Veranstaltung.php index f8d3e01..5d90e6d 100644 --- a/protected/models/Veranstaltung.php +++ b/protected/models/Veranstaltung.php @@ -160,7 +160,7 @@ class Veranstaltung extends CActiveRecord { return array( 'published'=>array( - 'condition'=>'published=1', + 'condition'=>'`t`.`published`=1', ), 'sorted'=>array( 'order'=>'startzeit ASC', @@ -170,10 +170,10 @@ class Veranstaltung extends CActiveRecord ), 'freitag'=>array( - 'condition'=>"dayofweek(startzeit)=6", + 'condition'=>"(dayofweek(startzeit)=6 or (dayofweek(startzeit)=7 and hour(startzeit) <= 2))", ), 'samstag'=>array( - 'condition'=>"dayofweek(startzeit)=7", + 'condition'=>"((dayofweek(startzeit)=7 and hour(startzeit) > 2) or (dayofweek(startzeit)=1 and hour(startzeit) <= 2))", ), 'sonntag'=>array( 'condition'=>"dayofweek(startzeit)=1", |
