summaryrefslogtreecommitdiff
path: root/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_views/handlers/ldap_views_handler_argument.inc
diff options
context:
space:
mode:
Diffstat (limited to 'kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_views/handlers/ldap_views_handler_argument.inc')
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_views/handlers/ldap_views_handler_argument.inc21
1 files changed, 21 insertions, 0 deletions
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_views/handlers/ldap_views_handler_argument.inc b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_views/handlers/ldap_views_handler_argument.inc
new file mode 100644
index 0000000..1554b97
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_views/handlers/ldap_views_handler_argument.inc
@@ -0,0 +1,21 @@
+<?php
+
+/**
+ * @file
+ * Basic textfield argument to handle known ldap attributes
+ */
+class ldap_views_handler_argument extends views_handler_argument {
+
+ /**
+ * Build the query based upon the formula
+ */
+ function query() {
+ if ($this->real_field == 'basedn' || $this->real_field == 'filter') {
+ $add_method = 'add_' . $this->real_field;
+ $this->query->$add_method($this->argument);
+ }
+ else {
+ $this->query->add_where(0, $this->real_field, $this->argument, '=');
+ }
+ }
+}