Fixing error in search library
This commit is contained in:
@@ -233,7 +233,9 @@ function assemble_query ($criteria, $searchfields) {
|
|||||||
} //foreach $whereCriterias
|
} //foreach $whereCriterias
|
||||||
|
|
||||||
$whereClause .= str_repeat(')', $nesting);
|
$whereClause .= str_repeat(')', $nesting);
|
||||||
|
$whereClause = trim ($whereClause);
|
||||||
|
|
||||||
|
if ($whereClause != '') {
|
||||||
$query = sprintf ("SELECT bookmark.title,
|
$query = sprintf ("SELECT bookmark.title,
|
||||||
bookmark.url,
|
bookmark.url,
|
||||||
bookmark.description,
|
bookmark.description,
|
||||||
@@ -254,6 +256,10 @@ function assemble_query ($criteria, $searchfields) {
|
|||||||
$mysql->escape ($username),
|
$mysql->escape ($username),
|
||||||
$whereClause);
|
$whereClause);
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$query = false;
|
||||||
|
}
|
||||||
return $query;
|
return $query;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user