Projet

Général

Profil

Révision 5d12d676

Ajouté par Assos Assos il y a environ 6 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/views/modules/taxonomy/views_handler_filter_term_node_tid_depth.inc
14 14
 * @ingroup views_filter_handlers
15 15
 */
16 16
class views_handler_filter_term_node_tid_depth extends views_handler_filter_term_node_tid {
17
  function operator_options($which = 'title') {
17

  
18
  /**
19
   * {@inheritdoc}
20
   */
21
  public function operator_options($which = 'title') {
18 22
    return array(
19 23
      'or' => t('Is one of'),
20 24
    );
21 25
  }
22 26

  
23
  function option_definition() {
27
  /**
28
   * {@inheritdoc}
29
   */
30
  public function option_definition() {
24 31
    $options = parent::option_definition();
25 32

  
26 33
    $options['depth'] = array('default' => 0);
......
28 35
    return $options;
29 36
  }
30 37

  
31
  function extra_options_form(&$form, &$form_state) {
38
  /**
39
   * {@inheritdoc}
40
   */
41
  public function extra_options_form(&$form, &$form_state) {
32 42
    parent::extra_options_form($form, $form_state);
33 43

  
34 44
    $form['depth'] = array(
......
39 49
    );
40 50
  }
41 51

  
42
  function query() {
52
  /**
53
   * {@inheritdoc}
54
   */
55
  public function query() {
43 56
    // If no filter values are present, then do nothing.
44 57
    if (count($this->value) == 0) {
45 58
      return;
......
52 65
      $operator = '=';
53 66
    }
54 67
    else {
55
      $operator = 'IN';# " IN (" . implode(', ', array_fill(0, sizeof($this->value), '%d')) . ")";
68
      $operator = 'IN';
69
      // " IN ("
70
      // . implode(', ', array_fill(0, sizeof($this->value), '%d'))
71
      // . ")";
56 72
    }
57 73

  
58 74
    // The normal use of ensure_my_table() here breaks Views.
......
97 113
    $subquery->condition($where);
98 114
    $this->query->add_where($this->options['group'], "$this->table_alias.$this->real_field", $subquery, 'IN');
99 115
  }
116

  
100 117
}

Formats disponibles : Unified diff