Navigation Menu

Skip to content

Commit

Permalink
Minor fix to DB search
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisgraham committed Jun 25, 2012
1 parent e65f184 commit c3e4875
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sources/database_search.php
Expand Up @@ -203,7 +203,7 @@ function opensearch_script()
$q='SELECT s_primary,COUNT(*) as cnt,MAX(s_num_results) AS s_num_results FROM '.get_table_prefix().'searches_logged WHERE ';
if ((db_has_full_text($GLOBALS['SITE_DB']->connection_read)) && (method_exists($GLOBALS['SITE_DB']->static_ob,'db_has_full_text_boolean')) && ($GLOBALS['SITE_DB']->static_ob->db_has_full_text_boolean()) && (!is_under_radar($request)))
{
$q.=preg_replace('#\?(.*)#','s_primary${1}',db_full_text_assemble($request,false));
$q.=preg_replace('#\?#','s_primary',db_full_text_assemble($request,false));
} else
{
$q.='s_primary LIKE \''./*ideally we would put an % in front, but too slow*/db_encode_like($request.'%').'\'';
Expand Down

0 comments on commit c3e4875

Please sign in to comment.