[phpldapadmin] [ phpldapadmin-Patches-2726394 ] Allow multiple tree_display_formats

"SourceForge.net" <[email protected]>
Newsgroups gmane.comp.ldap.davedap
Message-ID <[email protected]>
Patches item #2726394, was opened at 2009-04-02 10:37
Message generated for change (Tracker Item Submitted) made by bigfoot_hunter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=498548&aid=2726394&group_id=61828

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Matthijs Kooijman (bigfoot_hunter)
Assigned to: Nobody/Anonymous (nobody)
Summary: Allow multiple tree_display_formats

Initial Comment:
The current code has a tree_display_format, that can be used to customize the display of objects in the tree. This format string allows one to use arbitrary attributes of the object. However, every object will always use the same format string, even when some or all attributes used in it are not defined for a particular object.

As an example: A lot of objects in my directory have a "displayName" attribute. I would like to display that for those objects. However, when I set 'tree_display_format' to '%displayName', any object without a displayName will show up as '<none>', which is pretty useless.

This patch deprecates tree_display_format and introduces a new variable: tree_display_formats. This new variable contains an array of format strings, each of which are tried in turn. The first one that does not use attributes that are not defined for a particular object is used. If there is no such format string, the last one is used.

This allows one to set tree_display_formats to array('%displayName', '%rdn') to use the displayName whenever available, and show the rdn otherwise.

Perhaps it is also worth considering to set the default tree_display_formats value to include %displayName?

The patch is made against 1.1.0.5, but I think it should mostly apply to the SANDPIT branch, though I think there need to be some trivial changes to the config handling.

The patch also updates the documentation in config_default.php. When this patch is accepted, I will also update the wiki.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=498548&aid=2726394&group_id=61828

------------------------------------------------------------------------------
______________________________________
phpLDAPadmin development mailing list.
To unsbuscribe: https://lists.sourceforge.net/lists/listinfo/phpldapadmin-devel
http://phpldapadmin.sourceforge.net/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.