Skip to content

Commit 9c55323

Browse files
committed
feat(ldapfield): comparisons support
fix #1454
1 parent fd25d4e commit 9c55323

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

inc/fields/ldapselectfield.class.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,19 +199,19 @@ public function parseAnswerValues($input, $nonDestructive = false) {
199199
}
200200

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

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

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

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

217217
public function isAnonymousFormCompatible() {

0 commit comments

Comments
 (0)