Skip to content

Commit

Permalink
enabled IN conditions in list query string filters
Browse files Browse the repository at this point in the history
  • Loading branch information
pollen8 committed Nov 19, 2013
1 parent b973100 commit c470ff8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions components/com_fabrik/models/listfilter.php
Expand Up @@ -936,6 +936,7 @@ private function getSearchFormFilters(&$filters)
}
}
}

/**
* unset the search form id so we wont reuse the search data
* untill a new search is performed
Expand Down Expand Up @@ -1029,7 +1030,7 @@ private function getQuerystringFilters(&$filters)
* do a ranged querystring search with this syntax
* ?element_test___time_date[value][]=2009-08-07&element_test___time_date[value][]=2009-08-10&element_test___time_date[condition]=BETWEEN
*/
if (is_array($value) && $condition != 'BETWEEN')
if (is_array($value) && $condition != 'BETWEEN' && strtoupper($condition) !== 'IN')
{
// If we aren't doing a ranged search
foreach ($value as $vk => $avalue)
Expand Down Expand Up @@ -1510,7 +1511,7 @@ private function getSessionFilters(&$filters)
$sqlCond = null;
$condition = array_key_exists($i, $sessionfilters['condition']) ? $sessionfilters['condition'][$i]
: $elementModel->getDefaultFilterCondition();
$origCondition = array_key_exists($i, $sessionfilters['orig_condition']) ? $sessionfilters['orig_condition'][$i]
$origCondition = array_key_exists('orig_condition', $sessionfilters) && array_key_exists($i, $sessionfilters['orig_condition']) ? $sessionfilters['orig_condition'][$i]
: $elementModel->getDefaultFilterCondition();
$raw = array_key_exists($i, $sessionfilters['raw']) ? $sessionfilters['raw'][$i] : 0;
$eval = array_key_exists($i, $sessionfilters['eval']) ? $sessionfilters['eval'][$i] : FABRIKFILTER_TEXT;
Expand Down

0 comments on commit c470ff8

Please sign in to comment.