« Return to Thread: [ phpldapadmin-Bugs-3513210 ] Export to VCARD only exports the last entry in the list

[ phpldapadmin-Bugs-3513210 ] Export to VCARD only exports the last entry in the list

by SourceForge.net :: Rate this Message:

| View in Thread

Bugs item #3513210, was opened at 2012-03-30 04:47
Message generated for change (Tracker Item Submitted) made by majky
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=498546&aid=3513210&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: Majo Fukasz (majky)
Assigned to: Nobody/Anonymous (nobody)
Summary: Export to VCARD only exports the last entry in the list

Initial Comment:
phpLDAPadmin:            1.2.2
Your LDAP server:          
Your web server:            Apache 2.2.11
PHP:                             5.2.4
Your operating system:  Windows XP

I think there's a bug in lib/export_functions.php, in class ExportVCARD that will always overwrite the output of the VCARD with the last entry, resulting in only the last entry being exported to the VCARD (instead of the whole list).

I fixed this by:
  [1] changing the line 597 (in version 1.2.2)
    from:
     $output = sprintf('BEGIN:VCARD%s',$this->br);
    to:
     $output .= sprintf('BEGIN:VCARD%s',$this->br);

  (changed '=' to '.=')

  [2] properly initializing the variable output at the start of export function (line ~581):
    $output = '';

Hope this helps.


<Majky>

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

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

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
______________________________________
phpLDAPadmin development mailing list.
To unsbuscribe: https://lists.sourceforge.net/lists/listinfo/phpldapadmin-devel
http://phpldapadmin.sourceforge.net/

 « Return to Thread: [ phpldapadmin-Bugs-3513210 ] Export to VCARD only exports the last entry in the list