function views_handler_filter_is_locked::query in Content locking (anti-concurrent editing) 7
Same name and namespace in other branches
- 6.2 views/views_handler_filter_is_locked.inc \views_handler_filter_is_locked::query()
- 6 views/views_handler_filter_is_locked.inc \views_handler_filter_is_locked::query()
Add this filter to the query.
Due to the nature of fapi, the value and the operator have an unintended level of indirection. You will find them in $this->operator and $this->value respectively.
Overrides views_handler_filter_boolean_operator::query
File
- views/
views_handler_filter_is_locked.inc, line 9 - Handler to filter based on locked nodes
Class
- views_handler_filter_is_locked
- @file Handler to filter based on locked nodes
Code
function query() {
$this
->ensure_my_table();
if (empty($this->value)) {
$this->query
->add_where($this->options['group'], "{$this->table_alias}.timestamp IS NULL");
}
else {
$this->query
->add_where($this->options['group'], "{$this->table_alias}.timestamp IS NOT NULL");
}
}