On 13/09/2009 11:34, Siki Zoltan wrote:
> Hi List,
> 
> I get in trouble with search, I have slash character in the search 
> pattern. When I use wildcard=2 it works, but when I try to use wildcard 0 
> or 1 it finds no match because slases are not escaped in query string ($qs 
> in search.php).
> in pm_debug.log I get
> [qStr] => (  "[HRSZ]" =~ /^(2|2)(2|2)(4|4)(8|8)(6|6)(9|9)/(2|2)$/)
> 
> The search string I looked for '224869/2'.
> I think the slashes would be escaped in the query string in search.php 
> (getSearchParamsShp). I use shape files.
> 

Zoltan

Try to replace line 230 in
in query/search.php (function getSearchParamsShp())
with the following

if ($wildcard != 2) {
     $qval = str_replace("/", "\\/", preg_quote($val));
     $val = preg_replace ("/\w/ie", "'('. strtoupper('$0') . '|' .
strtolower('$0') .')'", $qval);
}

and see if it helps. It also escapes other special characters that could 
cause problems with regex. Suggest functions might also not work with 
such strings, that I had to check.

Armin


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users

Reply via email to