Révision 5d12d676
Ajouté par Assos Assos il y a environ 6 ans
drupal7/sites/all/modules/views/modules/node/views_handler_argument_node_uid_revision.inc | ||
---|---|---|
2 | 2 |
|
3 | 3 |
/** |
4 | 4 |
* @file |
5 |
* Defintion of views_handler_argument_node_uid_revision. |
|
5 |
* Definition of views_handler_argument_node_uid_revision.
|
|
6 | 6 |
*/ |
7 | 7 |
|
8 | 8 |
/** |
9 |
* Filter handler to accept a user id to check for nodes that |
|
10 |
* user posted or created a revision on.
|
|
9 |
* Filter handler to accept a user id to check for nodes that user posted or
|
|
10 |
* created a revision on. |
|
11 | 11 |
*/ |
12 | 12 |
class views_handler_argument_node_uid_revision extends views_handler_argument_comment_user_uid { |
13 |
function query($group_by = FALSE) { |
|
13 |
|
|
14 |
/** |
|
15 |
* {@inheritdoc} |
|
16 |
*/ |
|
17 |
public function query($group_by = FALSE) { |
|
14 | 18 |
$this->ensure_my_table(); |
15 | 19 |
$placeholder = $this->placeholder(); |
16 | 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)); |
17 | 21 |
} |
22 |
|
|
18 | 23 |
} |
Formats disponibles : Unified diff
Weekly update of contrib modules