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_field_node_revision_link.inc
12 12
 */
13 13
class views_handler_field_node_revision_link extends views_handler_field_node_link {
14 14

  
15
  function construct() {
15
  /**
16
   * {@inheritdoc}
17
   */
18
  public function construct() {
16 19
    parent::construct();
17 20
    $this->additional_fields['node_vid'] = array('table' => 'node_revision', 'field' => 'vid');
18 21
  }
19 22

  
20
  function access() {
23
  /**
24
   * {@inheritdoc}
25
   */
26
  public function access() {
21 27
    return user_access('view revisions') || user_access('administer nodes');
22 28
  }
23 29

  
24
  function render_link($data, $values) {
30
  /**
31
   * {@inheritdoc}
32
   */
33
  public function render_link($data, $values) {
25 34
    list($node, $vid) = $this->get_revision_entity($values, 'view');
26 35
    if (!isset($vid)) {
27 36
      return;
......
52 61
   *   A numerically indexed array containing the current node object and the
53 62
   *   revision ID for this row.
54 63
   */
55
  function get_revision_entity($values, $op) {
64
  public function get_revision_entity($values, $op) {
56 65
    $vid = $this->get_value($values, 'node_vid');
57 66
    $node = $this->get_value($values);
58 67
    // Unpublished nodes ignore access control.
......
63 72
    }
64 73
    return array($node, $vid);
65 74
  }
75

  
66 76
}

Formats disponibles : Unified diff