Commits

Anonymous committed 210a353

R1.05

  • Participants
  • Parent commits 57dbcb7

Comments (0)

Files changed (5)

+1998-04-29  Oscar Figueiredo  <Oscar.Figueiredo@di.epfl.ch>
+
+	* eudc: Released 1.05
+
+1998-04-28  SL Baur  <steve@altair.xemacs.org>
+
+	* eudc.el: (Top Level): Don't add menu when running InfoDock.
+
+1998-04-26  Oscar Figueiredo  <Oscar.Figueiredo@di.epfl.ch>
+
+	* eudc.el: (eudc-display-records): Fixed for fields without 
+	value
+
+	* eudc-ldap.el: (eudc-ldap-get-field-list): New function
+	(eudc-ldap-protocol-locals): Added reference to
+ 	`eudc-ldap-get-field-list'
+	(eudc-ldap-cleanup-record-field): Fixed for fields without 
+	value
+
 1998-04-21  Oscar Figueiredo  <Oscar.Figueiredo@di.epfl.ch>
 
 	* eudc: Released 1.04
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
-VERSION = 1.04
-AUTHOR_VERSION = 1.04
+VERSION = 1.05
+AUTHOR_VERSION = 1.05
 MAINTAINER = Oscar Figueiredo <Oscar.Figueiredo@epfl.ch>
 PACKAGE = eudc
 PKG_TYPE = regular
 ;; Author: Oscar Figueiredo <Oscar.Figueiredo@epfl.ch>
 ;; Maintainer: Oscar Figueiredo <Oscar.Figueiredo@epfl.ch>
 ;; Created: Feb 1998
-;; Version: 1.6
+;; Version: 1.7
 ;; Keywords: help
 
 ;; This file is part of XEmacs
 
 (defconst eudc-ldap-protocol-locals 
   '((eudc-query-function . eudc-ldap-simple-query-internal)
+    (eudc-list-attributes-function . eudc-ldap-get-field-list)
     (eudc-protocol-attributes-translation-alist . eudc-ldap-attributes-translation-alist)
     (eudc-bbdb-conversion-alist . eudc-ldap-bbdb-conversion-alist)
     (eudc-protocol-switch-init-function . eudc-ldap-protocol-switch-init)
 (defun eudc-ldap-cleanup-record-field (field)
   "Do some cleanup in a record field to make it suitable for EUDC."
   ;; Make the field a cons-cell if it's single-valued
-  ;; 
-  (if (null (cdr (cdr field)))
+  (if (stringp (car (cdr field)))
       (cons (intern (car field)) 
-	    ;; Convert separators to newlines
 	    (eudc-filter-$ (car (cdr field))))
-    ;; Make the field name a symbol
+    ;; Otherwise simply make the field name a symbol
     (cons (intern (car field)) (cdr field))))
 
 (defun eudc-ldap-cleanup-record (record)
 		       eudc-server
 		       (mapcar 'symbol-name return-attrs))))
 
+(defun eudc-ldap-get-field-list (dummy &optional objectclass)
+  "Return a list of valid attribute names for the current server.
+OBJECTCLASS is the LDAP obejct class for which the valid
+attribute names are returned. Default to `person'"
+  (interactive)
+  (or eudc-server
+      (call-interactively 'eudc-set-server))
+  (let ((ldap-host-parameters-alist 
+	 (list (list eudc-server
+		     '(scope . subtree)
+		     '(sizelimit . 1)))))
+    (mapcar 'eudc-ldap-cleanup-record
+	    (ldap-search 
+	     (eudc-ldap-format-query-as-rfc1558 
+	      (list (cons "objectclass"
+			  (or objectclass
+			      "person"))))
+	     eudc-server nil t))))
+
 (defun eudc-ldap-format-query-as-rfc1558 (query)
-  "Format the QUERY list as a RFC1558 LDAP search filter."
+  "Format the EUDC QUERY list as a RFC1558 LDAP search filter."
   (format "(&%s)" (apply 'concat (mapcar '(lambda (item)
 					    (format "(%s=%s)" (car item) (cdr item)))
 					 query))))
 ;; Author: Oscar Figueiredo <Oscar.Figueiredo@epfl.ch>
 ;; Maintainer: Oscar Figueiredo <Oscar.Figueiredo@epfl.ch>
 ;; Created: Feb 1998
-;; Version: 1.16
+;; Version: 1.18
 ;; Keywords: help
 
 ;; This file is part of XEmacs
 		(if eudc-strict-return-matches
 		    "Try setting `eudc-strict-return-matches' to nil or change `eudc-default-return-attributes'.\n"
 		  ""))
-      ;; Replace field names with prompt strings, compute max prompt width
+      ;; Replace field names with user names, compute max width
       (setq precords
 	    (mapcar 
 	     (function
 				     (lambda (val)
 				       (indent-to (+ 2 width))
 				       (insert val "\n")))
-				    (if (stringp (cdr field))
-					(split-string (cdr field) "\n")
-				      (cdr field)))))
+				    (cond 
+				     ((stringp (cdr field))
+				      (split-string (cdr field) "\n"))
+				     ((null (cdr field))
+				      '(""))
+				     (t
+				      (cdr field))))))
 			 record)
 		 ;; Store the record internal format in some convenient place
 		 (overlay-put (make-overlay beg (point))
 	 (not (featurep 'eudc-options-file)))
     (load eudc-options-file))	 
 ;;; Install the full menu
-(eudc-install-menu)
+(unless (featurep 'infodock)
+  (eudc-install-menu))
 
 
 
 
 ;;;###autoload
 (if (and (string-match "XEmacs" emacs-version)
-	 (not (featurep 'eudc)))
+	 (not (featurep 'eudc))
+	 (not (featurep 'infodock)))
     (add-submenu '("Tools")
 		 '("Directory"
 		   ["Load Hotlist of Servers" eudc-load-eudc t]
 * EUDC::   A client for directory servers (LDAP, PH)
 @end direntry
 
-This file documents EUDC v1.04
+This file documents EUDC v1.05
 
 EUDC is part of XEmacs.
 
 @comment  node-name,  next,         previous, up
 
 
-This manual documents EUDC v1.04, the Emacs Unified Directory Client.
+This manual documents EUDC v1.05, the Emacs Unified Directory Client.
 
 A common interface interface to directory servers using various
 protocols such as LDAP or the CCSO white pages directory system (PH/QI)