>>
>> I've recently upgraded to squirrelmail "Version 1.4.23 - SVN" so that I
>> could gain php 5.4 compatibility.
>>
>> After some initial issues that I have been able to resolve I have come
to
>> an impasse.
>>
>> It appears that at sometime between 1.4.22 and 1.4.23 the address book
>> search functionality has changed and I have a user that would like to
>> enable the previous functionality.
>>
>> In version 1.4.22 you could do an address book search and it would
return
>> results in the "label" or "info" fields. The newer version doesn't
appear
>> to search this field.
>>
>> My question is thus. Is there a config variable that controls what
>> address book fields are searched, and if there is not where in the code
>> should I look to see if I can make my own change?
>>
>>
>> Thanks,
>>
>> Ted Hatfield
>> PrismNet Ltd.
>>
>>
On Tue, 6 Aug 2013, "T?th Attila" wrote:
> Hi Ted,
>
> I'm not aware of any config variable you are looking for.
> However you may try this:
> --- squirrelmail-1.4.23_SVN20130612-orig/functions/abook_database.php
> 2012-01-02 01:18:17.000000000 +0100
> +++ /var/www/localhost/htdocs/squirrelmail/functions/abook_database.php
> 2013-06-17 00:28:18.506202292 +0200
> @@ -250,9 +250,10 @@
> "(LOWER(firstname) LIKE '%s' %s " .
> "OR LOWER(lastname) LIKE '%s' %s " .
> "OR LOWER(email) LIKE '%s' %s " .
> + "OR LOWER(label) LIKE '%s' %s " .
> "OR LOWER(nickname) LIKE '%s' %s)",
> $this->table, $this->owner, $expr, $escape,
> $expr, $escape,
> - $expr, $escape,
> $expr, $escape);
> + $expr, $escape, $expr, $escape,
> $expr, $escape);
> $res = $this->dbh->query($query);
>
> if (DB::isError($res)) {
>
> This simple patch will make the search work on the comment field as well.
>
> Regards:
> Dw.
> --
> dr T?th Attila, Radiol?gus, 06-20-825-8057
> Attila Toth MD, Radiologist, +36-20-825-8057
>
> 2013.Augusztus 6.(K) 01:30 id?pontban Ted Hatfield ezt ?rta:
Well,
I'm using the local_abook_file backend instead of the database backend so
this patch didn't immediately solve my issue, however it did allow me to
find the correct location in the abook_local_file.php file to modify to
fix my problem.
Here is the patch for abook_local_file.php to search the label field.
--- abook_local_file.php.org 2013-08-06 11:43:27.000000000 -0500
+++ abook_local_file.php 2013-08-06 11:45:00.000000000 -0500
@@ -297,7 +297,8 @@
if (@preg_match('/' . $expr . '/i', $row[0]) // nickname
|| @preg_match('/' . $expr . '/i', $row[1]) // firstname
|| @preg_match('/' . $expr . '/i', $row[2]) // lastname
- || @preg_match('/' . $expr . '/i', $row[3])) { // email
+ || @preg_match('/' . $expr . '/i', $row[3]) // email
+ || @preg_match('/' . $expr . '/i', $row[4])) { // info
array_push($res, array('nickname' => $row[0],
'name' => $row[1] . ' ' .
$row[2],
'firstname' => $row[1],
Thanks for the assitance. It helped me greatly.
Ted Hatifeld
PrismNet Ltd.
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
-----
squirrelmail-users mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: [email protected]
List archives: http://news.gmane.org/gmane.mail.squirrelmail.user
List info (subscribe/unsubscribe/change options):
https://lists.sourceforge.net/lists/listinfo/squirrelmail-users