Searching problem - characters being returned. Searching problem - characters being returned.
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Searching problem - characters being returned.

Started by essaytee, January 14, 2011, 06:13:17 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

essaytee

I've installed Coppermine 1.5.   Testing the search feature, I enter a single character, "1", searching against the default set (title, keywords etc.).   The problem is that where "1" is in the keyword ie "2010" it's being returned as a result, which shouldn't be the case.

I tag many photos with the bib number of runners & cyclists.   Sometimes bib numbers are single digits as opposed to three or more digits.

Any clues or suggestions please.


ΑndrĂ©

Untested: open include/search.inc.php, find
if (in_array($param, $allowed)) $fields[] = "$param LIKE '%$word%'";
and replace with
if (in_array($param, $allowed)) $fields[] = "$param = '$word'";

Maybe you have to replace
if (in_array($param, $allowed)) $fields[] = "$param LIKE '%$string%'";
with
if (in_array($param, $allowed)) $fields[] = "$param = '$string'";
additionally.

essaytee