Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Searching problem - characters being returned.  (Read 1932 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.028 seconds with 20 queries.