Révision 5d12d676
Ajouté par Assos Assos il y a environ 6 ans
drupal7/sites/all/modules/views/modules/translation/views_handler_field_node_link_translate.inc | ||
---|---|---|
11 | 11 |
* @ingroup views_field_handlers |
12 | 12 |
*/ |
13 | 13 |
class views_handler_field_node_link_translate extends views_handler_field_node_link { |
14 |
function render_link($data, $values) { |
|
14 |
|
|
15 |
/** |
|
16 |
* {@inheritdoc} |
|
17 |
*/ |
|
18 |
public function render_link($data, $values) { |
|
15 | 19 |
// ensure user has access to edit this node. |
16 | 20 |
$node = $this->get_value($values); |
17 |
$node->status = 1; // unpublished nodes ignore access control |
|
21 |
$node->status = 1; |
|
22 |
// unpublished nodes ignore access control. |
|
18 | 23 |
if (empty($node->language) || !translation_supported_type($node->type) || !node_access('view', $node) || !user_access('translate content')) { |
19 | 24 |
return; |
20 | 25 |
} |
... | ... | |
26 | 31 |
$text = !empty($this->options['text']) ? $this->options['text'] : t('translate'); |
27 | 32 |
return $text; |
28 | 33 |
} |
34 |
|
|
29 | 35 |
} |
Formats disponibles : Unified diff
Weekly update of contrib modules