fix: NULL cat_id has to be found in case of NOT cat_id searches

This commit is contained in:
Cornelius Weiß 2007-07-02 15:32:24 +00:00
parent e3203f7cd9
commit 2ce3929f46

View File

@ -365,7 +365,12 @@ class socontacts_sql extends so_sql
{
$cat_filter[] = $this->db->concat("','",cat_id,"','")." $not LIKE '%,$cat,%'";
}
return '('.implode(' OR ',$cat_filter).')';
$cfilter = '('.implode(' OR ',$cat_filter).')';
if(!empty($not))
{
$cfilter = "( $cfilter OR cat_id IS NULL )";
}
return $cfilter;
}
/**
@ -536,4 +541,4 @@ class socontacts_sql extends so_sql
return $this->db->row(true);
}
}
}