[imp] image blocking in inline html messages searches all turba sources

Amith Varghese amith at xalan.com
Thu Nov 11 08:57:04 PST 2004


This is probably a bug.  When I added this functionality I just grabbed all
the sources using Turba's API.  Most likely it needs to changed so that
address books not used for searching are removed from this list.  You can make
this change in imp/lib/MIME/Viewer/html.php

function _inAddressBook(&$contents)
     {
         global $registry;

         /* If we don't have access to the sender information, return false. */
         $base_ob = &$contents->getBaseObjectPtr();

         /* Get the lists of available address books. */
         $sources = $registry->call('contacts/sources');

/* REMOVE ADDRESS BOOKS THAT ARE NOT SEARCHABLE HERE */

         /* Try to get back a result from the search. */
         $result = $registry->call('contacts/getField', array($base_ob-
> getFromAddress(), '__key', array_keys($sources)));

         if (is_a($result, 'PEAR_Error')) {
             return false;
         } else {
             return ((count($result)) ? true : false);
         }
     }

}


Quoting liamr at umich.edu:

> We're running the beta stuff on our development webmail server, I've 
> turned on
> inline HTML viewing w/ the "block stuff that's not from someone in your
> addressbook" option.  Viewing HTML messages is *really* slow.  Looking at the
> horde logs, it searching both the user's individual addressbook and out LDAP
> server.  The only "search_source" that's defined is the SQL database.  Should
> it be querying all the sources that are defined in Turba?
>
> Liam
> --
> IMP mailing list - Join the hunt: http://horde.org/bounties/#imp
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: imp-unsubscribe at lists.horde.org
>
> !DSPAM:419395d571672128521394!





More information about the imp mailing list