summaryrefslogtreecommitdiff
path: root/protected/models
diff options
context:
space:
mode:
authorPatrick Seeger <pseeger@ccwn.org>2012-06-26 16:59:26 +0200
committerPatrick Seeger <pseeger@ccwn.org>2012-06-26 16:59:26 +0200
commitd7f3ac205ced0e1f1c26599b277cbfb988e48900 (patch)
treefa2f976c67ee8d47146d07689982607dcaf92d3b /protected/models
parent66e981bd3d3f9946afed0efbcaf8efa7907c530f (diff)
Anzeige optimiert, Vereine und Veranstaltungen veröffentlicht
Diffstat (limited to 'protected/models')
-rw-r--r--protected/models/Veranstaltung.php14
-rw-r--r--protected/models/Verein.php8
2 files changed, 22 insertions, 0 deletions
diff --git a/protected/models/Veranstaltung.php b/protected/models/Veranstaltung.php
index 0117033..60536cf 100644
--- a/protected/models/Veranstaltung.php
+++ b/protected/models/Veranstaltung.php
@@ -108,8 +108,10 @@ class Veranstaltung extends CActiveRecord
$criteria->compare('standort_id',$this->standort_id);
$criteria->compare('published',true);
+
return new CActiveDataProvider($this, array(
'criteria'=>$criteria,
+
));
}
@@ -145,4 +147,16 @@ class Veranstaltung extends CActiveRecord
// 'LoggableBehavior'=>'application.modules.auditTrail.behaviors.LoggableBehavior',
);
}
+ public function scopes()
+ {
+ return array(
+ 'published'=>array(
+ 'condition'=>'published=1',
+ ),
+ 'sorted'=>array(
+ 'order'=>'startzeit ASC',
+
+ ),
+ );
+ }
} \ No newline at end of file
diff --git a/protected/models/Verein.php b/protected/models/Verein.php
index 78117e0..242bd95 100644
--- a/protected/models/Verein.php
+++ b/protected/models/Verein.php
@@ -133,4 +133,12 @@ class Verein extends CActiveRecord
// 'LoggableBehavior'=>'application.modules.auditTrail.behaviors.LoggableBehavior',
);
}
+ public function scopes()
+ {
+ return array(
+ 'published'=>array(
+ 'condition'=>'published=1',
+ ),
+ );
+ }
} \ No newline at end of file