Skip to content
Snippets Groups Projects
Commit 94e4bb5e authored by lunaris's avatar lunaris Committed by Tim Plunkett
Browse files

Issue #1748114 by lunaris | damiankloip: Replace calls to comment properties...

Issue #1748114 by lunaris | damiankloip: Replace calls to comment properties with entity interface methods.
parent b604f99c
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -61,7 +61,7 @@ function render_link($data, $values) {
$text = !empty($this->options['text']) ? $this->options['text'] : t('view');
$comment = $this->get_value($values);
$nid = $comment->nid;
$cid = $comment->cid;
$cid = $comment->id();
$this->options['alter']['make_link'] = TRUE;
$this->options['alter']['html'] = TRUE;
......
......@@ -55,7 +55,7 @@ function render_link($data, $values) {
$this->options['alter']['query'] = drupal_get_destination();
}
$this->options['alter']['path'] = "comment/" . $comment->cid . "/edit";
$this->options['alter']['path'] = "comment/" . $comment->id() . "/edit";
return $text;
}
......
......@@ -129,7 +129,7 @@ function render($row) {
),
array(
'key' => 'guid',
'value' => 'comment ' . $comment->cid . ' at ' . $base_url,
'value' => 'comment ' . $comment->id() . ' at ' . $base_url,
'attributes' => array('isPermaLink' => 'false'),
),
);
......@@ -156,10 +156,10 @@ function render($row) {
$item = new stdClass();
$item->description = $item_text;
$item->title = $comment->subject;
$item->title = $comment->label();
$item->link = $comment->link;
$item->elements = $comment->rss_elements;
$item->cid = $comment->cid;
$item->cid = $comment->id();
return theme($this->theme_functions(), array(
'view' => $this->view,
......
......@@ -102,7 +102,7 @@ function pre_render($result) {
$nids = array();
foreach ($cresult as $comment) {
$comment->depth = count(explode('.', $comment->thread)) - 1;
$this->comments[$comment->cid] = $comment;
$this->comments[$comment->id()] = $comment;
$nids[] = $comment->nid;
}
......
......@@ -614,7 +614,7 @@ function template_preprocess_views_view_row_comment(&$vars) {
// Put the view on the node so we can retrieve it in the preprocess.
$node->view = &$view;
$build = comment_view_multiple(array($comment->cid => $comment), $node, $plugin->options['view_mode']);
$build = comment_view_multiple(array($comment->id() => $comment), $node, $plugin->options['view_mode']);
// If we're displaying the comments without links, remove them from the
// renderable array. There is no way to avoid building them in the first
// place (see comment_build_content()).
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment