r23134 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r23133‎ | r23134 | r23135 >
Date:20:24, 20 June 2007
Author:aaron
Status:old
Tags:
Comment:
*More hook cleanup per new rules
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedRevs.php
@@ -509,6 +509,7 @@
510510 $article->mTitle->invalidateCache();
511511 }
512512 }
 513+ return true;
513514 }
514515
515516 function updateFromMove( &$movePageForm , &$oldtitle , &$newtitle ) {
@@ -517,6 +518,8 @@
518519 array('fr_namespace' => $newtitle->getNamespace(), 'fr_title' => $newtitle->getDBkey() ),
519520 array('fr_namespace' => $oldtitle->getNamespace(), 'fr_title' => $oldtitle->getDBkey() ),
520521 __METHOD__ );
 522+
 523+ return true;
521524 }
522525
523526 public static function articleLinksUpdate( &$title ) {
@@ -534,6 +537,8 @@
535538 }
536539 $u = new LinksUpdate( $title, $poutput );
537540 $u->doUpdate(); // this will trigger our hook to add stable links too...
 541+
 542+ return true;
538543 }
539544
540545 public static function extraLinksUpdate( &$title ) {
@@ -606,6 +611,7 @@
607612 }
608613
609614 wfProfileOut( $fname );
 615+ return true;
610616 }
611617
612618 static function parserFetchStableTemplate( &$parser, &$title, &$skip, &$id ) {
@@ -630,6 +636,7 @@
631637 $id = 0; // Zero for not found
632638 $skip = true;
633639 }
 640+ return true;
634641 }
635642
636643 static function parserMakeStableImageLink( &$parser, &$nt, &$skip, &$time ) {
@@ -652,6 +659,7 @@
653660 $time = 0; // Zero for not found
654661 $skip = true;
655662 }
 663+ return true;
656664 }
657665
658666 static function galleryFindStableFileTime( &$ig, &$nt, &$time ) {
@@ -664,6 +672,8 @@
665673 array('fi_rev_id' => $ig->mRevisionId, 'fi_name' => $nt->getDBkey() ),
666674 __METHOD__ );
667675 $time = $time ? $time : -1; // hack, will never find this
 676+
 677+ return true;
668678 }
669679
670680 static function parserMakeGalleryStable( &$parser, &$ig ) {
@@ -672,6 +682,8 @@
673683 return true;
674684
675685 $ig->isStable = true;
 686+
 687+ return true;
676688 }
677689
678690 static function parserInjectImageTimestamps( &$parser, &$text ) {
@@ -687,10 +699,12 @@
688700 $parser->mOutput->mImageTimestamps[$row->img_name] = $row->img_timestamp;
689701 }
690702 }
 703+ return true;
691704 }
692705
693706 static function outputInjectImageTimestamps( &$out, &$parserOutput ) {
694707 $out->mImageTimestamps = $parserOutput->mImageTimestamps;
 708+ return true;
695709 }
696710
697711 /**
@@ -730,6 +744,7 @@
731745 $log->addEntry('grant1', $user->getUserPage(), wfMsgHtml('makevalidate-autosum') );
732746 }
733747 }
 748+ return true;
734749 }
735750 }
736751
@@ -765,7 +780,7 @@
766781 global $wgRequest, $wgTitle, $wgOut, $action;
767782 // Only trigger on article view for content pages, not for protect/delete/hist
768783 if( !$article || !$article->exists() || !$article->mTitle->isContentPage() || $action !='view' )
769 - return;
 784+ return true;
770785 // Grab page and rev ids
771786 $pageid = $article->getId();
772787 $revid = $article->mRevision ? $article->mRevision->mId : $article->getLatest();
@@ -859,6 +874,7 @@
860875 $tag = '<div id="mwrevisiontag" class="mw-warning plainlinks">'.wfMsgExt('revreview-noflagged', array('parseinline')).'</div>';
861876 $wgOut->addHTML( $tag );
862877 }
 878+ return true;
863879 }
864880
865881 function addToEditView( &$editform ) {
@@ -893,7 +909,8 @@
894910 wfMsg('revreview-rating') . parent::addTagRatings( $flags ) .
895911 '</span>';
896912 $wgOut->addHTML( '<div id="mwrevisiontag" class="flaggedrevs_notice plainlinks">' . $tag . '</div><br/>' );
897 - }
 913+ }
 914+ return true;
898915 }
899916
900917 function addReviewForm( &$out ) {
@@ -918,6 +935,8 @@
919936 if( $tfrev ) return true;
920937 }
921938 $this->addQuickReview( $revId, $out, false );
 939+
 940+ return true;
922941 }
923942
924943 function setPermaLink( &$sktmp, &$nav_urls, &$revid, &$revid ) {
@@ -943,6 +962,7 @@
944963 );
945964 }
946965 }
 966+ return true;
947967 }
948968
949969 function setCurrentTab( &$sktmp, &$content_actions ) {
@@ -1047,6 +1067,7 @@
10481068 # Reset static array
10491069 $content_actions = $new_actions;
10501070 }
 1071+ return true;
10511072 }
10521073
10531074 function addToPageHist( &$article ) {
@@ -1062,9 +1083,10 @@
10631084 if( !$rows )
10641085 return true;
10651086
1066 - foreach( $rows as $rev => $quality ) {
 1087+ foreach( $rows as $rev => $quality )
10671088 $this->pageFlaggedRevs[$rev] = $quality;
1068 - }
 1089+
 1090+ return true;
10691091 }
10701092
10711093 function addToHistLine( &$row, &$s ) {
@@ -1077,6 +1099,8 @@
10781100 $this->skin->makeLinkObj( $special, wfMsgHtml($msg), 'oldid='.$row->rev_id ) .
10791101 '</strong></small></tt>';
10801102 }
 1103+
 1104+ return true;
10811105 }
10821106
10831107 function addQuickReview( $id=NULL, $out ) {

Status & tagging log