[turba] Add to Addressbook

Mark Hennessy mark at cloud9.net
Thu Apr 24 15:57:43 PDT 2003


System specs:
horde 2.2,imp 3.2,turba 1.2,FreeBSD 4.8, Apache/1.3.27 (Unix) PHP/4.3.1
mod_fastcgi/2.4.0 mod_ssl/2.8.14 OpenSSL/0.9.7a MySQL 4.0.12

Problem:
I had a problem with "Add to Addressbook" which consisted of the
RFC-formatted naming of the e-mail address info being imported into the
addressbook instead of the bare e-mail address as I suspect is the desired
behavior.  I tried putting a few regexps in to strip out the offending
characters and it seems to work pretty well.

I know it's not in patch format, but here goes:

In imp/message.php under case ADD_ADDRESS:

-- BEGIN SNIPPET --
 case ADD_ADDRESS:
     $newAddress = Horde::getFormData('address');
     $newName = Horde::getFormData('name');
/* regexps added begin */
     $newName = strip_tags($newName);
     $newAddress = eregi_replace('>','',$newAddress);
     $newAddress = eregi_replace('<','',$newAddress);
     $newAddress = eregi_replace('\"','',$newAddress);
     $newAddress = eregi_replace('<','',$newAddress);
     $newAddress = eregi_replace('>','',$newAddress);
     $newAddress = eregi_replace('\"','',$newAddress);
     $newAddress = eregi_replace(' ','',$newAddress);
/* regexps added end */
-- END SNIPPET --

Also:
Though my fix for this item is also a crappy hack, when I add my
head info to common-header.inc in horde proper, help.php there would be
unusable as the header would show up in both the navigation frame of the
popup as well as the content frame of the popup.  Commenting out line 27,
where common-header.inc sort of fixes it, but its font is nasty looking so
I guess making another header.inc for help's use only would be a complete
workaround.

--
 Mark P. Hennessy					      mark at cloud9.net


More information about the turba mailing list