Révision 5d12d676
Ajouté par Assos Assos il y a environ 6 ans
drupal7/sites/all/modules/views/modules/comment/views_handler_field_comment_link_approve.inc | ||
---|---|---|
11 | 11 |
* @ingroup views_field_handlers |
12 | 12 |
*/ |
13 | 13 |
class views_handler_field_comment_link_approve extends views_handler_field_comment_link { |
14 |
function access() { |
|
14 |
|
|
15 |
/** |
|
16 |
* {@inheritdoc} |
|
17 |
*/ |
|
18 |
public function access() { |
|
15 | 19 |
//needs permission to administer comments in general |
16 | 20 |
return user_access('administer comments'); |
17 | 21 |
} |
18 | 22 |
|
19 |
function render_link($data, $values) { |
|
23 |
/** |
|
24 |
* {@inheritdoc} |
|
25 |
*/ |
|
26 |
public function render_link($data, $values) { |
|
20 | 27 |
$status = $this->get_value($values, 'status'); |
21 | 28 |
|
22 | 29 |
// Don't show an approve link on published nodes. |
... | ... | |
33 | 40 |
|
34 | 41 |
return $text; |
35 | 42 |
} |
43 |
|
|
36 | 44 |
} |
Formats disponibles : Unified diff
Weekly update of contrib modules