bitwise logic issue comparing with multiple bits

This commit is contained in:
friendica 2013-07-02 21:57:18 -07:00
parent 15ae313595
commit d3b745db5d

View file

@ -99,7 +99,7 @@ function format_term_for_display($term) {
function tagadelic($uid, $count = 0, $flags = 0, $type = TERM_HASHTAG) {
if($flags)
$sql_options = " and (item_flags & " . intval($flags) . ") ";
$sql_options = " and ((item_flags & " . intval($flags) . ") = " . intval($flags) . ") ";
// Fetch tags
$r = q("select term, count(term) as total from term left join item on term.oid = item.id
where term.uid = %d and term.type = %d