Index: trunk/extensions/CodeReview/backend/CodeRevision.php |
— | — | @@ -334,15 +334,13 @@ |
335 | 335 | ); |
336 | 336 | |
337 | 337 | // 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(); |
340 | 339 | |
341 | 340 | foreach ( $res as $row ) { |
342 | 341 | $revision = CodeRevision::newFromRow( $row ); |
343 | 342 | $users = $revision->getCommentingUsers(); |
344 | 343 | |
345 | | - $rowTitle = SpecialPage::getTitleFor( 'Code', $this->mRepo->getName() . '/' . $row->mId ); |
346 | | - $rowUrl = $rowTitle->getFullUrl(); |
| 344 | + $rowUrl = $revision->getFullUrl(); |
347 | 345 | |
348 | 346 | $revisionAuthor = $revision->getWikiUser(); |
349 | 347 | |
— | — | @@ -788,6 +786,11 @@ |
789 | 787 | return false; |
790 | 788 | } |
791 | 789 | } |
| 790 | + |
| 791 | + public function getFullUrl() { |
| 792 | + $title = SpecialPage::getTitleFor( 'Code', $this->mRepo->getName() . '/' . $this->mId ); |
| 793 | + return $title->getFullUrl(); |
| 794 | + } |
792 | 795 | |
793 | 796 | protected function sendCommentToUDP( $commentId, $text, $url = null ) { |
794 | 797 | global $wgCodeReviewUDPAddress, $wgCodeReviewUDPPort, $wgCodeReviewUDPPrefix, $wgLang, $wgUser; |