Skip to content

Commit

Permalink
Fixed issue #12132: Survey List Status Filter 'Active and running' d…
Browse files Browse the repository at this point in the history
…oes not list expiring surveys (#645)
  • Loading branch information
TonisOrmisson authored and LouisGac committed Mar 2, 2017
1 parent 6a168fc commit 65c80e0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion application/models/Survey.php
Expand Up @@ -1117,8 +1117,9 @@ public function search()
$subCriteria1 = new CDbCriteria;
$subCriteria2 = new CDbCriteria;
$subCriteria1->addCondition($now.' > t.startdate', 'OR');
$subCriteria2->addCondition($now.' < t.expires', 'OR');
$subCriteria1->addCondition('t.expires IS NULL', "OR");
$subCriteria1->addCondition($now.' < t.expires', 'OR');
$subCriteria2->addCondition($now.' < t.expires', 'OR');
$subCriteria2->addCondition('t.startdate IS NULL', "OR");
$criteria->mergeWith($subCriteria1);
$criteria->mergeWith($subCriteria2);
Expand Down

0 comments on commit 65c80e0

Please sign in to comment.