Skip to content

Commit

Permalink
Allow filtering by multiple forms Refs T773
Browse files Browse the repository at this point in the history
  • Loading branch information
rjmackay committed Mar 11, 2015
1 parent 3ee9726 commit 0c9db7a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion application/classes/Ushahidi/Repository/Post.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,10 @@ protected function setSearchConditions(SearchData $search)
{
if ($search->$key)
{
$query->where("$table.{$key}_id", '=', $search->$key);
if (!is_array($search->$key)) {
$search->$key = explode(',', $search->$key);
}
$query->where("$table.{$key}_id", 'IN', $search->$key);
}
}

Expand Down

0 comments on commit 0c9db7a

Please sign in to comment.