Newer
Older
The Great Git Migration
committed
<?php
/**
* Filter by published status
*
* @ingroup views_filter_handlers
The Great Git Migration
committed
*/
class views_handler_filter_node_status extends views_handler_filter {
function admin_summary() { }
function operator_form(&$form, &$form_state) { }
Bojan Živanović
committed
function can_expose() { return FALSE; }
The Great Git Migration
committed
function query() {
$table = $this->ensure_my_table();
$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 ***ADMINISTER_NODES*** = 1");