r88605 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r88604‎ | r88605 | r88606 >
Date:20:56, 22 May 2011
Author:reedy
Status:resolved (Comments)
Tags:
Comment:
* (bug 28091) CR comments can show Edit section links

Bit of a hack, just append __NOEDITSECTION__ to each comment before parsing. Unfortunately, the parser doesn't expose any other way of setting this property, so this allows it to be done explicitally and obviously at the point of parsing
Modified paths:
  • /trunk/extensions/CodeReview/ui/CodeRevisionView.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/ui/CodeRevisionView.php
@@ -696,7 +696,7 @@
697697 $this->commentReplyLink( $comment->id ) .
698698 '</div>' .
699699 '<div class="mw-codereview-comment-text">' .
700 - $wgOut->parse( $this->codeCommentLinkerWiki->link( $comment->text ) ) .
 700+ $wgOut->parse( "__NOEDITSECTION__" . $this->codeCommentLinkerWiki->link( $comment->text ) ) .
701701 '</div>' .
702702 $replyForm .
703703 '</div>';

Follow-up revisions

RevisionCommit summaryAuthorDate
r88606Followup r88591, mangle parseroptions insteadreedy21:45, 22 May 2011

Comments

#Comment by Platonides (talk | contribs)   21:34, 22 May 2011

Ahem... ParserOptions->setEditSection(false);

#Comment by Reedy (talk | contribs)   21:45, 22 May 2011

I've got a feeling I've used that somewhere before. But it does help to look in the right place. Thanks! ;)

Status & tagging log