Skip to content

Commit

Permalink
fix(condition): use of constants
Browse files Browse the repository at this point in the history
Signed-off-by: Thierry Bugier <tbugier@teclib.com>
  • Loading branch information
btry committed Jan 23, 2020
1 parent 89fb9dd commit 234b4e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions inc/fields.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public static function isVisible(PluginFormcreatorConditionnableInterface $item,
$evalItem[$itemtype][$itemId] = null;

// Force the first logic operator to OR
$conditions[0]['logic'] = 'OR';
$conditions[0]['logic'] = PluginFormcreatorCondition::SHOW_LOGIC_OR;

$return = false;
$lowPrecedenceReturnPart = false;
Expand All @@ -182,7 +182,7 @@ public static function isVisible(PluginFormcreatorConditionnableInterface $item,
$nextLogic = $conditions[$order + 1]['logic'];
} else {
// To ensure the low precedence return part is used at the end of the whole evaluation
$nextLogic = 'OR';
$nextLogic = PluginFormcreatorCondition::SHOW_LOGIC_OR;
}

// TODO: find the best behavior if the question does not exists
Expand Down

0 comments on commit 234b4e3

Please sign in to comment.