summaryrefslogtreecommitdiff
path: root/protected/models
diff options
context:
space:
mode:
Diffstat (limited to 'protected/models')
-rw-r--r--protected/models/Angebot.php8
-rw-r--r--protected/models/Veranstaltung.php4
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'))",
),
);