Skip to content

Commit

Permalink
Slightly improved detection of "empty" in placeholder replacement when
Browse files Browse the repository at this point in the history
using the {foo__bar||default} syntax, so it works for things like
dropdowns.  Would be nice to call the element's dataConsideredEmpty()
method, but that would be a huge overhead.
  • Loading branch information
cheesegrits committed Nov 26, 2015
1 parent 4575618 commit 5d62d7f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions components/com_fabrik/helpers/parent.php
Expand Up @@ -948,10 +948,8 @@ protected function replaceWithFormData($matches)
{
$match = self::parseMessageForPlaceHolder('{' . $bits[0] . '}', $this->_searchData, false);

if ($match == '')
if (in_array($match, array('', '<ul></ul>', '<ul><li></li></ul>')))
{
// $$$ rob seems like bits[1] in fabrik plugin is already matched so return that rather then reparsing
// $match = self::parseMessageForPlaceHolder("{".$bits[1]."}", $this->_searchData);
return $bits[1] !== '' ? $bits[1] : $orig;
}
else
Expand Down

0 comments on commit 5d62d7f

Please sign in to comment.