http://www.mediawiki.org/wiki/Special:Code/MediaWiki/71208
Revision: 71208 Author: reedy Date: 2010-08-17 18:47:31 +0000 (Tue, 17 Aug 2010) Log Message: ----------- Add getFullUrl function as minor followup to r71207 Modified Paths: -------------- trunk/extensions/CodeReview/backend/CodeRevision.php Modified: trunk/extensions/CodeReview/backend/CodeRevision.php =================================================================== --- trunk/extensions/CodeReview/backend/CodeRevision.php 2010-08-17 18:44:07 UTC (rev 71207) +++ trunk/extensions/CodeReview/backend/CodeRevision.php 2010-08-17 18:47:31 UTC (rev 71208) @@ -334,15 +334,13 @@ ); // Get repo and build comment title (for url) - $title = SpecialPage::getTitleFor( 'Code', $this->mRepo->getName() . '/' . $this->mId ); - $url = $title->getFullUrl(); + $url = $this->getFullUrl(); foreach ( $res as $row ) { $revision = CodeRevision::newFromRow( $row ); $users = $revision->getCommentingUsers(); - $rowTitle = SpecialPage::getTitleFor( 'Code', $this->mRepo->getName() . '/' . $row->mId ); - $rowUrl = $rowTitle->getFullUrl(); + $rowUrl = $revision->getFullUrl(); $revisionAuthor = $revision->getWikiUser(); @@ -788,6 +786,11 @@ return false; } } + + public function getFullUrl() { + $title = SpecialPage::getTitleFor( 'Code', $this->mRepo->getName() . '/' . $this->mId ); + return $title->getFullUrl(); + } protected function sendCommentToUDP( $commentId, $text, $url = null ) { global $wgCodeReviewUDPAddress, $wgCodeReviewUDPPort, $wgCodeReviewUDPPrefix, $wgLang, $wgUser; _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs