Projet

Général

Profil

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

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

1
<?php
2

    
3
/**
4
 * @file
5
 * Definition of views_handler_argument_node_uid_revision.
6
 */
7

    
8
/**
9
 * Filter handler to accept a user id to check for nodes that user posted or
10
 * created a revision on.
11
 */
12
class views_handler_argument_node_uid_revision extends views_handler_argument_comment_user_uid {
13

    
14
  /**
15
   * {@inheritdoc}
16
   */
17
  public function query($group_by = FALSE) {
18
    $this->ensure_my_table();
19
    $placeholder = $this->placeholder();
20
    $this->query->add_where_expression(0, "$this->table_alias.uid = $placeholder OR ((SELECT COUNT(*) FROM {node_revision} nr WHERE nr.uid = $placeholder AND nr.nid = $this->table_alias.nid) > 0)", array($placeholder => $this->argument));
21
  }
22

    
23
}