r71208 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r71207‎ | r71208 | r71209 >
Date:18:47, 17 August 2010
Author:reedy
Status:ok
Tags:
Comment:
Add getFullUrl function as minor followup to r71207
Modified paths:
  • /trunk/extensions/CodeReview/backend/CodeRevision.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/backend/CodeRevision.php
@@ -334,15 +334,13 @@
335335 );
336336
337337 // Get repo and build comment title (for url)
338 - $title = SpecialPage::getTitleFor( 'Code', $this->mRepo->getName() . '/' . $this->mId );
339 - $url = $title->getFullUrl();
 338+ $url = $this->getFullUrl();
340339
341340 foreach ( $res as $row ) {
342341 $revision = CodeRevision::newFromRow( $row );
343342 $users = $revision->getCommentingUsers();
344343
345 - $rowTitle = SpecialPage::getTitleFor( 'Code', $this->mRepo->getName() . '/' . $row->mId );
346 - $rowUrl = $rowTitle->getFullUrl();
 344+ $rowUrl = $revision->getFullUrl();
347345
348346 $revisionAuthor = $revision->getWikiUser();
349347
@@ -788,6 +786,11 @@
789787 return false;
790788 }
791789 }
 790+
 791+ public function getFullUrl() {
 792+ $title = SpecialPage::getTitleFor( 'Code', $this->mRepo->getName() . '/' . $this->mId );
 793+ return $title->getFullUrl();
 794+ }
792795
793796 protected function sendCommentToUDP( $commentId, $text, $url = null ) {
794797 global $wgCodeReviewUDPAddress, $wgCodeReviewUDPPort, $wgCodeReviewUDPPrefix, $wgLang, $wgUser;

Follow-up revisions

RevisionCommit summaryAuthorDate
r71209Add optional parameter to getFullUrl from r71208, to allow for #c1234...reedy18:51, 17 August 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r71207*(bug 24811) Link to the revision being followed up in a followup emailreedy18:44, 17 August 2010

Status & tagging log