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: search my e-mail address  (Read 1961 times)

0 Members and 1 Guest are viewing this topic.

mia123

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
search my e-mail address
« on: January 11, 2007, 02:56:33 am »

My gallery has e-mail addresses in captures. I would like people to be able to search my gallery by e-mail address. But everytime I enter e-mail in search, no results are returned, though such e-mail does exist in captures. When I just enter a handle, it returns results.

For example:
"someone@somewhere.com" - no results
just "someone" - returns results.

This is no good, I want people to be able to search by full e-mail, not just a handle.

I know it has to do with "@" sign. I used to have a previous version, 1.3.x and I managed to fix it there, in search.inc.php, there used to be a part:

    static $drop_char_match ....
    static $drop_char_replace .....

That's where I fixed it, by removing @ character from the list of "weird" characters. But this new version is so confusing, I cannot find this part anywhere, and don't know how to fix it in v.1.4.x.

Please help me, I am stuck, and I REALLY need it, my gallery is practically useless without the ability to search by e-mail contained in captures.
Logged

Nibbler

  • Guest
Re: search my e-mail address
« Reply #1 on: January 11, 2007, 04:26:15 pm »

You'd need to change the regex here in search.inc.php

Code: [Select]
$search_string = preg_replace('/[^0-9a-z %]/i', '', $search_string);
maybe

Code: [Select]
$search_string = preg_replace('/[^0-9a-z %@\.\-_]/i', '', $search_string);
or remove the line entirely.
Logged
Pages: [1]   Go Up
 

Page created in 0.023 seconds with 20 queries.