$join2.=' LEFT JOIN {node_counter} nc ON nc.nid = i.sid';
$total+=$weight;
}
$select2=(count($ranking)?implode(' + ',$ranking):'i.relevance').' AS score';
// Do search
// When all search factors are disabled (ie they have a weight of zero),
// the default score is based only on keyword relevance and there is no need to
// adjust the score of each item.
if($total==0){
$select2='i.relevance AS score';
$total=1;
}
else{
$select2=implode(' + ',$ranking).' AS score';
}
// Do search.
$find=do_search($keys,'node','INNER JOIN {node} n ON n.nid = i.sid '.$join1.' INNER JOIN {users} u ON n.uid = u.uid',$conditions1.(empty($where1)?'':' AND '.$where1),$arguments1,$select2,$join2,$arguments2);