Gossamer Forum
Home : Products : Gossamer Links : PHP Front End :

BUG in the search only this category!

Quote Reply
BUG in the search only this category!
Hi!

This is a very serious error
  • if you make a search for a word that in one has not determined category links returns all the URLīs that exist in the data base.






Mad ex:

gossamer-threads.com/scripts/links-sql/page.php?do=search&query=janio&cat_id=4049
[alex: edited the url to make it work]

Last edited by:

Alex: Mar 22, 2002, 9:55 AM
Quote Reply
Re: [Janio] BUG in the search only this category! In reply to
oops... It's a small fix:
Edit admin/Links/PHP/Search.inc.php line ~303, change:
Code:
# Now create a new condition.
if (sizeof($results)) {
$ids = join (', ', array_keys($results));
$query .= " WHERE ID IN ($ids)";
}
to:
Code:
# Now create a new condition.
if (sizeof($results)) {
$ids = join (', ', array_keys($results));
$query .= " WHERE ID IN ($ids)";
}
else {
$query .= " WHERE 1 = 0";
}

Adrian
Quote Reply
Re: [brewt] BUG in the search only this category! In reply to
Ok!



Thanks!!!!Cool