Return the found term instead of true in has_term.
parent
8e0793f5e7
commit
40975184e0
|
@ -1259,7 +1259,7 @@ class Filter extends ZM_Object {
|
||||||
|
|
||||||
public function has_term($attr, $op=null) {
|
public function has_term($attr, $op=null) {
|
||||||
foreach ($this->terms() as $term) {
|
foreach ($this->terms() as $term) {
|
||||||
if (($term['attr'] == $attr) and ((!$op) or ($term['op']==$op)) ) return true;
|
if (($term['attr'] == $attr) and ((!$op) or ($term['op']==$op)) ) return $term;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue