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/node/views_handler_filter_history_user_timestamp.inc
14 14
 * @ingroup views_filter_handlers
15 15
 */
16 16
class views_handler_filter_history_user_timestamp extends views_handler_filter {
17
  // Don't display empty space where the operator would be.
18
  var $no_operator = TRUE;
19 17

  
20
  function expose_form(&$form, &$form_state) {
18
  /**
19
   * Don't display empty space where the operator would be.
20
   */
21
  public $no_operator = TRUE;
22

  
23
  /**
24
   * {@inheritdoc}
25
   */
26
  public function expose_form(&$form, &$form_state) {
21 27
    parent::expose_form($form, $form_state);
22 28
    // @todo There are better ways of excluding required and multiple (object flags)
23 29
    unset($form['expose']['required']);
......
25 31
    unset($form['expose']['remember']);
26 32
  }
27 33

  
28
  function value_form(&$form, &$form_state) {
34
  /**
35
   * {@inheritdoc}
36
   */
37
  public function value_form(&$form, &$form_state) {
29 38
    // Only present a checkbox for the exposed filter itself. There's no way
30 39
    // to tell the difference between not checked and the default value, so
31 40
    // specifying the default value via the views UI is meaningless.
......
44 53
    }
45 54
  }
46 55

  
47
  function query() {
56
  /**
57
   * {@inheritdoc}
58
   */
59
  public function query() {
48 60
    global $user;
49 61
    // This can only work if we're logged in.
50 62
    if (!$user || !$user->uid) {
......
58 70

  
59 71
    // Hey, Drupal kills old history, so nodes that haven't been updated
60 72
    // since NODE_NEW_LIMIT are bzzzzzzzt outta here!
61

  
62 73
    $limit = REQUEST_TIME - NODE_NEW_LIMIT;
63 74

  
64 75
    $this->ensure_my_table();
......
79 90
    $this->query->add_where_expression($this->options['group'], "($field IS NULL AND ($node.changed > (***CURRENT_TIME*** - $limit) $clause)) OR $field < $node.changed $clause2");
80 91
  }
81 92

  
82
  function admin_summary() {
93
  /**
94
   * {@inheritdoc}
95
   */
96
  public function admin_summary() {
83 97
    if (!empty($this->options['exposed'])) {
84 98
      return t('exposed');
85 99
    }
86 100
  }
101

  
87 102
}

Formats disponibles : Unified diff