Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Searching problem - characters being returned.  (Read 1936 times)

0 Members and 1 Guest are viewing this topic.

essaytee

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Searching problem - characters being returned.
« on: January 14, 2011, 06:13:17 am »

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.

Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Searching problem - characters being returned.
« Reply #1 on: January 18, 2011, 02:30:48 pm »

Untested: open include/search.inc.php, find
Code: [Select]
if (in_array($param, $allowed)) $fields[] = "$param LIKE '%$word%'";and replace with
Code: [Select]
if (in_array($param, $allowed)) $fields[] = "$param = '$word'";
Maybe you have to replace
Code: [Select]
if (in_array($param, $allowed)) $fields[] = "$param LIKE '%$string%'";with
Code: [Select]
if (in_array($param, $allowed)) $fields[] = "$param = '$string'";additionally.
Logged

essaytee

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Searching problem - characters being returned.
« Reply #2 on: January 23, 2011, 12:51:53 pm »

Thanks, I'll give that a try.
Logged
Pages: [1]   Go Up
 

Page created in 0.016 seconds with 20 queries.