Skip to content

Commit

Permalink
fixed: list menu prefilters - eval not being used when specified
Browse files Browse the repository at this point in the history
  • Loading branch information
pollen8 committed Mar 7, 2016
1 parent 2a32704 commit 34f2a66
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions components/com_fabrik/models/list.php
Expand Up @@ -3538,12 +3538,12 @@ private function groupFilterSQL(&$filters, $type = '*')
}

}
// $$$rob ensure opening and closing parathethis for prefilters are equal
// $$$rob ensure opening and closing parenthesis for prefilters are equal
// Seems to occur if you have 3 prefilters with 2nd = grouped/AND and 3rd grouped/OR

if ($groupedCount > 0)
{
$sql[] = str_pad('', (int) $groupedCount, ")");
$sql[] = str_pad('', (int) $groupedCount, ')');
}
// Wrap in brackets
if (!empty($sql))
Expand Down Expand Up @@ -5430,7 +5430,6 @@ public function prefilterSetting()
* so first statement when rendering a module, 2nd when posting to the component from a module.
*/


if (isset($properties))
{
$prefilters = ArrayHelper::fromObject(json_decode($properties));
Expand Down Expand Up @@ -5497,7 +5496,7 @@ public function getPrefilterArray(&$filters)
{
$elements = $this->getElements('filtername', false, false);
list($filterFields, $filterConditions, $filterValues, $filterAccess,
$filterEval, $filterJoins, $filterGrouped, $listSearchType) = $this->prefilterSetting();
$filterEvals, $filterJoins, $filterGrouped, $listSearchType) = $this->prefilterSetting();


for ($i = 0; $i < count($filterFields); $i++)
Expand All @@ -5518,7 +5517,7 @@ public function getPrefilterArray(&$filters)
$condition = $filterConditions[$i];
$searchType = ArrayHelper::getValue($listSearchType, $i, 'prefilter');
$selValue = FArrayHelper::getValue($filterValues, $i, '');
$filterEval = FArrayHelper::getValue($filterEval, $i, false);
$filterEval = FArrayHelper::getValue($filterEvals, $i, false);
$filterGrouped = FArrayHelper::getValue($filterGrouped, $i, false);
$selAccess = $filterAccess[$i];

Expand Down

0 comments on commit 34f2a66

Please sign in to comment.