From df2cbf1d2979b46a2239eb9a159d1b1ec4df543f Mon Sep 17 00:00:00 2001 From: epriestley Date: Tue, 31 May 2011 19:19:11 -0700 Subject: [PATCH] Don't render "Comment T1#1" links on previews Summary: I somehow missed this, we render silly nonsense in the comment previews right now. Don't render these links if we're rendering a preview. Test Plan: Looked at comment previews, less nonsense. Reviewed By: tuomaspelkonen Reviewers: aran, jungejason, tuomaspelkonen CC: aran, tuomaspelkonen Differential Revision: 388 --- .../view/revisioncomment/DifferentialRevisionCommentView.php | 2 +- .../view/transactiondetail/ManiphestTransactionDetailView.php | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/applications/differential/view/revisioncomment/DifferentialRevisionCommentView.php b/src/applications/differential/view/revisioncomment/DifferentialRevisionCommentView.php index 46170d46d6..62e710be47 100644 --- a/src/applications/differential/view/revisioncomment/DifferentialRevisionCommentView.php +++ b/src/applications/differential/view/revisioncomment/DifferentialRevisionCommentView.php @@ -88,7 +88,7 @@ final class DifferentialRevisionCommentView extends AphrontView { $comment_anchor = null; $num = $this->commentNumber; - if ($num) { + if ($num && !$this->preview) { Javelin::initBehavior('phabricator-watch-anchor'); $info[] = phutil_render_tag( 'a', diff --git a/src/applications/maniphest/view/transactiondetail/ManiphestTransactionDetailView.php b/src/applications/maniphest/view/transactiondetail/ManiphestTransactionDetailView.php index 1258c9b4e2..a2fff50384 100644 --- a/src/applications/maniphest/view/transactiondetail/ManiphestTransactionDetailView.php +++ b/src/applications/maniphest/view/transactiondetail/ManiphestTransactionDetailView.php @@ -183,10 +183,9 @@ class ManiphestTransactionDetailView extends AphrontView { $info = array(); $info[] = $timestamp; - $comment_anchor = null; $num = $this->commentNumber; - if ($num) { + if ($num && !$this->preview) { Javelin::initBehavior('phabricator-watch-anchor'); $info[] = javelin_render_tag( 'a',