Skip to content

Commit

Permalink
Follow on to 7f62f09 for #1663 to fix bad
Browse files Browse the repository at this point in the history
query syntax, pointed out by Singularis in http://gallery.menalto.com/gallery_3.0.2_feedback#comment-383135
  • Loading branch information
bharat committed Oct 26, 2011
1 parent 2956d40 commit 80f24e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/search/helpers/search.php
Expand Up @@ -53,7 +53,7 @@ private static function _build_query_base($q, $where=array()) {
foreach (identity::group_ids_for_active_user() as $id) {
$fields[] = "`view_$id` = TRUE"; // access::ALLOW
}
$access_sql = "AND (" . join(" OR ", $fields) . ")";
$access_sql = " AND (" . join(" OR ", $fields) . ")";
} else {
$access_sql = "";
}
Expand Down Expand Up @@ -122,7 +122,7 @@ static function get_position($item, $q) {
$score = $db->query($query)->current()->score;
$score = substr($score, 0, strlen($score) - 2);

$data = $db->query(self::_build_query_base($q) . "having `score` >= " . $score);
$data = $db->query(self::_build_query_base($q) . " HAVING `score` >= " . $score);

$data->seek($data->count() - 1);

Expand Down

0 comments on commit 80f24e8

Please sign in to comment.