Issue #1748114 by lunaris | damiankloip: Replace calls to comment properties with entity interface methods.

8.0.x
lunaris 2012-08-26 10:10:00 +02:00 committed by Tim Plunkett
parent b604f99c37
commit 94e4bb5e11
5 changed files with 7 additions and 7 deletions

View File

@ -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;

View File

@ -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;
}

View File

@ -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,

View File

@ -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;
}

View File

@ -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()).