[Tickets #6517] Export to ldif - data has no cn attribute

bugs at horde.org bugs at horde.org
Sat Mar 22 14:27:20 UTC 2008


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/6517
-----------------------------------------------------------------------
 Ticket             | 6517
 Created By         | herbert at linuxhacker.at
 Summary            | Export to ldif - data has no cn attribute
 Queue              | Turba
 Version            | 2.2-RC3
 Type               | Bug
 State              | Unconfirmed
 Priority           | 1. Low
 Milestone          | 
 Patch              | 
 Owners             | 
-----------------------------------------------------------------------


herbert at linuxhacker.at (2008-03-22 10:27) wrote:

The exported ldif data has no valid cn attribute. This data, imported in
Mozilla Thunderbird, has no correct display name. Example:

dn: cn=,mail=herbert at linuxhacker.at

should be:

dn: cn=Straub Herbert,mail=herbert at linuxhacker.at

This patch works for me:

--- lib/Data/ldif.php.orig      2008-03-22 13:07:21.000000000 +0100
+++ lib/Data/ldif.php   2008-03-22 13:13:48.000000000 +0100
@@ -182,6 +182,10 @@
             $recordData = '';
             $recordCn = '';
             $recordMail = '';
+            // Straub construct name from firstname and lastname
+           if (!array_key_exists('name', $row)) {
+               $row['name'] = sprintf("%s %s", $row['firstname'],
$row['lastname']);
+            }
             foreach ($this->_mozillaAttr as $value) {
                 if (isset($row[$mozillaTurbaMap[$value]])) {
                     // Base64 encode each value as necessary and store
it.





More information about the bugs mailing list