[prev in list] [next in list] [prev in thread] [next in thread] 

List:       turba
Subject:    [turba] Turba 1.2RC1 and VCard Import
From:       Alexander Nimmervoll <nimm () technikum-wien ! at>
Date:       2003-02-23 10:42:48
[Download RAW message or body]

This message is in MIME format.


Hi!

I tested the VCard import of Turba 1.2RC1. There is no error message but VCards 
never get imported. Reading the source I could fix it with 2 little changes in 
data.php. The object tpye is compared with 'VCARD' but the content of the 
string is 'vcard' so the code never got executed. Moreover a function 
getBareAddress is called which doesn't exist in lib/Turba.php, if I change that 
function call to getBareEmail it works for me (Details in the patch)

Regards,
Alex.






["turba.diff" (text/plain)]

--- data.php	Sun Feb 23 11:06:23 2003
+++ ../turba-RELENG/data.php	Fri Jan  3 13:48:56 2003
@@ -232,7 +232,7 @@
                 } else {
                     $dest = $cfgSources[$dest]['map'];
                     foreach ($data as $object) {
-                        if ($object['type'] == 'vcard') {
+                        if ($object['type'] == 'VCARD') {
                             $hash = array();
                             foreach ($object['params'] as $item) {
 
@@ -273,7 +273,7 @@
 
                                 case 'EMAIL':
                                     if (isset($item['params']['PREF']) || !isset($hash['email'])) {
-                                        $hash['email'] = Turba::getBareEmail($vcf->read($item));
+                                        $hash['email'] = Turba::getBareAddress($vcf->read($item));
                                     }
                                     break;
 


-- 
Turba mailing list
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: turba-unsubscribe@lists.horde.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic