Projet

Général

Profil

Paste
Télécharger (803 octets) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / modules / views / modules / node / views_handler_filter_node_status.inc @ 5d12d676

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

    
15
  /**
16
   * {@inheritdoc}
17
   */
18
  public function admin_summary() {
19
  }
20

    
21
  /**
22
   * {@inheritdoc}
23
   */
24
  public function operator_form(&$form, &$form_state) {
25
  }
26

    
27
  /**
28
   * {@inheritdoc}
29
   */
30
  public function can_expose() {
31
    return FALSE;
32
  }
33

    
34
  /**
35
   * {@inheritdoc}
36
   */
37
  public function query() {
38
    $table = $this->ensure_my_table();
39
    $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");
40
  }
41

    
42
}