Révision 5d12d676
Ajouté par Assos Assos il y a environ 6 ans
drupal7/sites/all/modules/views/modules/node/views_handler_field_node_revision_link_revert.inc | ||
---|---|---|
12 | 12 |
*/ |
13 | 13 |
class views_handler_field_node_revision_link_revert extends views_handler_field_node_revision_link { |
14 | 14 |
|
15 |
function access() { |
|
15 |
/** |
|
16 |
* {@inheritdoc} |
|
17 |
*/ |
|
18 |
public function access() { |
|
16 | 19 |
return user_access('revert revisions') || user_access('administer nodes'); |
17 | 20 |
} |
18 | 21 |
|
19 |
function render_link($data, $values) { |
|
22 |
/** |
|
23 |
* {@inheritdoc} |
|
24 |
*/ |
|
25 |
public function render_link($data, $values) { |
|
20 | 26 |
list($node, $vid) = $this->get_revision_entity($values, 'update'); |
21 | 27 |
if (!isset($vid)) { |
22 | 28 |
return; |
... | ... | |
33 | 39 |
|
34 | 40 |
return !empty($this->options['text']) ? $this->options['text'] : t('revert'); |
35 | 41 |
} |
42 |
|
|
36 | 43 |
} |
Formats disponibles : Unified diff
Weekly update of contrib modules