Skip to content

Commit 1cb94ad

Browse files
committed
feat(ldapfield): comparisons support
fix #1454
1 parent fa432f7 commit 1cb94ad

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
@@ -252,19 +252,19 @@ public function parseAnswerValues($input, $nonDestructive = false) {
252252
}
253253

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

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

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

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

270270
public function isAnonymousFormCompatible() {

0 commit comments

Comments
 (0)