[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Savannah-hackers-public] Exact Search patch

From: Sylvain Beucler
Subject: Re: [Savannah-hackers-public] Exact Search patch
Date: Thu, 8 May 2008 17:50:02 +0200
User-agent: Mutt/1.5.17+20080114 (2008-01-14)


On Wed, May 07, 2008 at 05:46:29PM -0400, Nicodemo Alvaro wrote:
> Hello, Sylvain. This is Nick again who wrote to you under the address@hidden 
> email.
> <br>
> <br>> - Try to avoid introducing spaces or newlines (you can inspect the
> <br>>   diff and remove them before sending it), so those small differences
> <br>>   don't appear in the diff and distrub the reader.
> <br>
> <br>I think I have no unnecessary new lines now.

The patch applies like a charm now :)

> <br>>- You modified a function that sends headers. But now the function
> <br>>  sends both the results headers and the exact results, so this is
> <br>>  confusing. Maybe search_exact() needs to be called from
> <br>>  frontend/php/search/index.php, rather than from
> <br>>  search_send_header().
> <br>
> <br>This time I split search_send_header() into search_send_header() and 
> print_search_heading(), because it will allow me to place a function between 
> the Header and the full results Heading on the frontend/php/search/index.php. 
> If I place a function before the original search_send_header() function on 
> index.php it will appear at the top of the page and not inside the body.

This looks good.
(I also had to reference a few 'global' in print_search_heading() though)

> <br>>- db_execute has a second argument, which is an array of values to
> <br>>  include in the query (it replaces "?"s) and properly escape (to
> <br>>  avoid SQL injections). You need to use it to properly escape
> <br>
> <br>Not sure if it did the trick for it, but I did use that function and it 
> accepts the array fine. I am not very good at testing SQL bad stuff either.

I modified this part of the code and included it in Savane :)

You can see your changes here:;a=commitdiff;h=baf1000ec220eb482755e223452987f8f11d1ca9
and my additions at:;a=commitdiff;h=5e52ab61c006227384d5c5e63b8dbbcf3fea5973

I also installed the new code at

To test SQL queries, you can edit your .savane.conf.php, and add:

This will add a list of all complete/interpolated SQL queries at the
bottom of the page.

Btw, I appreciate not receiving advertising in the mails ;)
I still have some troubles as it seems I get HTML-only mails, but this
is definitely better.

When you feel confident that the code runs fine at Savannah and
there's no bug, we could tell RMS that this improved the search
results for 'emacs', as he requested.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]