Commit d5f7817f authored by merlinofchaos's avatar merlinofchaos

#142504: (mfrederickson) added proper is_null filter.

parent 6d46518e
......@@ -2,8 +2,9 @@ CHANGELOG for Views for Drupal 5
Views 5.x-1.6-dev
Bugs fixed:
o #154272: Uncacheable queries did not get substitutions properly run on them.
o #146776: Unnecessary drupal_goto in views_ui_admin_confirm_form_submit removed.
o #154272: (adrianr) Uncacheable queries did not get substitutions properly run on them.
o #146776: (Moxide) Unnecessary drupal_goto in views_ui_admin_confirm_form_submit removed.
o #142504: (mfrederickson) added proper is_null filter.
Views 5.x-1.6-beta5
Bugs fixed:
......
......@@ -1985,6 +1985,23 @@ function views_handler_filter_like($op, $filter, $filterinfo, &$query) {
}
}
/**
* Custom filter for IS NULL and IS NOT NULL operations
* Operator must be 'IS' or 'IS NOT'
*/
function views_handler_filter_null($op, $filter, $filterinfo, &$query) {
switch($op) {
case 'handler':
$table = $filterinfo['table'];
$column = $filterinfo['field'];
$field = "$table.$column";
$query->ensure_table($table);
$operator = $filter['operator'];
$query->add_where("$field $operator NULL");
break;
}
}
/**
* Format a field as file size.
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment