On Fri, May 05, 2006 at 05:41:57AM +0000, Philip Bergen wrote:
> Hi,
> Am I the only one that has a broken search function using sqlite
> storage? It has been broken since beginning of april.
> It is some sort of attempt to escape %-chars, but I am not familiar with
> the syntax. The following patch will fix the search function, but it
> will not solve the %-char issue:
>
> Index: trac/Search.py
> ===================================================================
> --- trac/Search.py (revision 3269)
> +++ trac/Search.py (working copy)
> @@ -75,7 +75,7 @@
> if len(columns) < 1 or len(terms) < 1:
> raise TracError('Empty search attempt, this should really not
> happen.')
>
> - likes = [r"%s %s %%s ESCAPE '/'" % (i, db.like()) for i in columns]
> + likes = [r"%s %s %%s" % (i, db.like()) for i in columns]
> c = ' OR '.join(likes)
> sql = '(' + ') AND ('.join([c] * len(terms)) + ')'
> args = []
http://projects.edgewall.com/trac/ticket/2960
--
Evolution: Taking care of those too stupid to take care of themselves.
_______________________________________________
Trac-dev mailing list
[email protected]
http://lists.edgewall.com/mailman/listinfo/trac-dev