1
|
<?php
|
2
|
|
3
|
/**
|
4
|
* @file
|
5
|
* Definition of views_handler_filter_node_status.
|
6
|
*/
|
7
|
|
8
|
/**
|
9
|
* Filter by published status.
|
10
|
*
|
11
|
* @ingroup views_filter_handlers
|
12
|
*/
|
13
|
class views_handler_filter_node_status extends views_handler_filter {
|
14
|
function admin_summary() { }
|
15
|
function operator_form(&$form, &$form_state) { }
|
16
|
function can_expose() { return FALSE; }
|
17
|
|
18
|
function query() {
|
19
|
$table = $this->ensure_my_table();
|
20
|
$this->query->add_where_expression($this->options['group'], "$table.status = 1 OR ($table.uid = ***CURRENT_USER*** AND ***CURRENT_USER*** <> 0 AND ***VIEW_OWN_UNPUBLISHED_NODES*** = 1) OR ***BYPASS_NODE_ACCESS*** = 1");
|
21
|
}
|
22
|
}
|