Skip to content

Commit

Permalink
feat(ldapfield): comparisons support
Browse files Browse the repository at this point in the history
fix #1454
  • Loading branch information
btry committed Aug 22, 2019
1 parent fa432f7 commit 1cb94ad
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions inc/fields/ldapselectfield.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -252,19 +252,19 @@ public function parseAnswerValues($input, $nonDestructive = false) {
}

public function equals($value) {
throw new PluginFormcreatorComparisonException('Meaningless comparison');
return $this->value == $value;
}

public function notEquals($value) {
throw new PluginFormcreatorComparisonException('Meaningless comparison');
return !$this->equals($value);
}

public function greaterThan($value) {
throw new PluginFormcreatorComparisonException('Meaningless comparison');
return $this->value > $value;
}

public function lessThan($value) {
throw new PluginFormcreatorComparisonException('Meaningless comparison');
return !$this->greaterThan($value) && !$this->equals($value);
}

public function isAnonymousFormCompatible() {
Expand Down

0 comments on commit 1cb94ad

Please sign in to comment.