Issue #1748114 by lunaris | damiankloip: Replace calls to comment properties with entity interface methods.
parent
b604f99c37
commit
94e4bb5e11
|
@ -61,7 +61,7 @@ class Link extends Entity {
|
|||
$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 @@ class LinkEdit extends Link {
|
|||
$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 @@ class Rss extends RowPluginBase {
|
|||
),
|
||||
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 @@ class Rss extends RowPluginBase {
|
|||
|
||||
$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 @@ class View extends RowPluginBase {
|
|||
$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()).
|
||||
|
|
Loading…
Reference in New Issue