Skip to content

Commit

Permalink
Fixed issue #11505: When browsing survey responses, search fields giv…
Browse files Browse the repository at this point in the history
…es a 404 error

Dev Partial fix
  • Loading branch information
c-schmitz committed Jul 28, 2016
1 parent 7b2a6d6 commit d4d15d9
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions application/models/SurveyDynamic.php
Expand Up @@ -605,8 +605,9 @@ public function search()
}

// Basic filters
$criteria->compare('t.id',$this->id, false);
$criteria->compare('t.lastpage',$this->lastpage, true);

$criteria->compare('t.id',empty($this->id)?null:(int)$this->id, false);
$criteria->compare('t.lastpage',empty($this->lastpage)?null:(int)$this->lastpage, true);
$criteria->compare('t.submitdate',$this->submitdate, true);
$criteria->compare('t.startlanguage',$this->startlanguage, true);

Expand All @@ -628,7 +629,10 @@ public function search()
if(!in_array($column->name, $this->defaultColumns))
{
$c1 = (string) $column->name;
$criteria->compare($c1, $this->$c1, true);
if (!empty($this->$c1))
{
$criteria->compare($c1, $this->$c1, false);
}
}
}

Expand Down

0 comments on commit d4d15d9

Please sign in to comment.