Welcome to Geeklog, Anonymous Monday, October 14 2024 @ 07:15 pm EDT

Geeklog Forums

Search on GeekLog site broken: Search string: Who's new


Chase

Anonymous
i get the following error

An SQL error has occurred. Please see error.log for details.
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Fixed, thanks. It was actually a bug in the search of the forum plugin.

bye, Dirk
 Quote

Chase

Anonymous
how do i fix it on my site?
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
In the forum plugin's functions.inc file, find the function plugin_dopluginsearch_forum(). Change this:
Text Formatted Code
    if ( $keyType == 'phrase' ) {
         $query = addslashes($query); // <-- new
        $sqltmp .= "AND (comment LIKE '%$query%' OR subject LIKE '%$query%')";
    } else  if ( $keyType == 'any' ) {

and a bit further down:
Text Formatted Code
    } else {
        $query = addslashes($query); // <-- new
        $sqltmp = "WHERE (comment LIKE '%$query%' OR subject LIKE '%$query%')";
    }

bye, Dirk
 Quote

All times are EDT. The time is now 07:15 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content