Index: trunk/extensions/CodeReview/backend/CodeRevision.php |
— | — | @@ -337,7 +337,7 @@ |
338 | 338 | $committer = $commitAuthor ? $commitAuthor->getName() : htmlspecialchars( $this->mAuthor ); |
339 | 339 | // Get the authors of these revisions |
340 | 340 | $res = $dbw->select( 'code_rev', |
341 | | - array( |
| 341 | + array( |
342 | 342 | 'cr_repo_id', |
343 | 343 | 'cr_id', |
344 | 344 | 'cr_author', |
— | — | @@ -363,11 +363,11 @@ |
364 | 364 | foreach ( $res as $row ) { |
365 | 365 | $revision = CodeRevision::newFromRow( $this->mRepo, $row ); |
366 | 366 | $users = $revision->getCommentingUsers(); |
367 | | - |
| 367 | + |
368 | 368 | $rowUrl = $revision->getFullUrl(); |
369 | | - |
| 369 | + |
370 | 370 | $revisionAuthor = $revision->getWikiUser(); |
371 | | - |
| 371 | + |
372 | 372 | //Add the followup revision author if they have not already been added as a commentor (they won't want dupe emails!) |
373 | 373 | if ( $revisionAuthor && !array_key_exists( $revisionAuthor->getId(), $users ) ) { |
374 | 374 | $users[$revisionAuthor->getId()] = $revisionAuthor; |
— | — | @@ -589,7 +589,7 @@ |
590 | 590 | } |
591 | 591 | return $changes; |
592 | 592 | } |
593 | | - |
| 593 | + |
594 | 594 | public function getPropChangeUsers() { |
595 | 595 | $dbr = wfGetDB( DB_SLAVE ); |
596 | 596 | $result = $dbr->select( 'code_prop_changes', |
— | — | @@ -606,7 +606,7 @@ |
607 | 607 | } |
608 | 608 | return $users; |
609 | 609 | } |
610 | | - |
| 610 | + |
611 | 611 | /** |
612 | 612 | * "Review" being revision commenters, and people who set/removed tags and changed the status |
613 | 613 | */ |
— | — | @@ -660,7 +660,7 @@ |
661 | 661 | } |
662 | 662 | return $refs; |
663 | 663 | } |
664 | | - |
| 664 | + |
665 | 665 | /** |
666 | 666 | * Add references from the specified revisions to this revision. In the UI, this will |
667 | 667 | * show the specified revisions as follow-ups to this one. |
— | — | @@ -685,9 +685,9 @@ |
686 | 686 | |
687 | 687 | private function addReferences( $data ) { |
688 | 688 | $dbw = wfGetDB( DB_MASTER ); |
689 | | - $dbw->insert( 'code_relations', $data, __METHOD__, array( 'IGNORE' ) ); |
| 689 | + $dbw->insert( 'code_relations', $data, __METHOD__, array( 'IGNORE' ) ); |
690 | 690 | } |
691 | | - |
| 691 | + |
692 | 692 | /** |
693 | 693 | * Same as addReferencesFrom(), but adds references from this revision to |
694 | 694 | * the specified revisions. |
— | — | @@ -706,7 +706,7 @@ |
707 | 707 | } |
708 | 708 | $this->addReferences( $data ); |
709 | 709 | } |
710 | | - |
| 710 | + |
711 | 711 | /** |
712 | 712 | * Remove references from the specified revisions to this revision. In the UI, this will |
713 | 713 | * no longer show the specified revisions as follow-ups to this one. |
— | — | @@ -738,7 +738,7 @@ |
739 | 739 | __METHOD__, |
740 | 740 | array( 'ORDER BY' => 'cs_timestamp' ) |
741 | 741 | ); |
742 | | - |
| 742 | + |
743 | 743 | $signoffs = array(); |
744 | 744 | foreach ( $result as $row ) { |
745 | 745 | $signoffs[] = CodeSignoff::newFromRow( $this, $row ); |
— | — | @@ -969,14 +969,14 @@ |
970 | 970 | return false; |
971 | 971 | } |
972 | 972 | } |
973 | | - |
| 973 | + |
974 | 974 | public function getFullUrl( $commentId = '' ) { |
975 | 975 | $title = SpecialPage::getTitleFor( 'Code', $this->mRepo->getName() . '/' . $this->mId ); |
976 | | - |
| 976 | + |
977 | 977 | if ( $commentId !== '' ) { |
978 | 978 | $title->setFragment( "#c{$commentId}" ); |
979 | 979 | } |
980 | | - |
| 980 | + |
981 | 981 | return $title->getFullUrl(); |
982 | 982 | } |
983 | 983 | |
— | — | @@ -991,14 +991,14 @@ |
992 | 992 | $line = wfMsg( 'code-rev-message' ) . " \00314(" . $this->mRepo->getName() . |
993 | 993 | ")\003 \0037" . $this->getIdString() . "\003 \00303" . RecentChange::cleanupForIRC( $wgUser->getName() ) . |
994 | 994 | "\003: \00310" . RecentChange::cleanupForIRC( $wgLang->truncate( $text, 100 ) ) . "\003 " . $url; |
995 | | - |
| 995 | + |
996 | 996 | RecentChange::sendToUDP( $line, $wgCodeReviewUDPAddress, $wgCodeReviewUDPPrefix, $wgCodeReviewUDPPort ); |
997 | 997 | } |
998 | 998 | } |
999 | 999 | |
1000 | 1000 | protected function sendStatusToUDP( $status, $oldStatus ) { |
1001 | 1001 | global $wgCodeReviewUDPAddress, $wgCodeReviewUDPPort, $wgCodeReviewUDPPrefix, $wgUser; |
1002 | | - |
| 1002 | + |
1003 | 1003 | if( $wgCodeReviewUDPAddress ) { |
1004 | 1004 | $url = $this->getFullUrl(); |
1005 | 1005 | |