Index: trunk/extensions/FlaggedRevs/maintenance/reviewAllPages.inc |
— | — | @@ -36,7 +36,6 @@ |
37 | 37 | $frev = FlaggedRevision::newFromTitle( $title, $row->page_latest, FR_MASTER ); |
38 | 38 | # Should exist, but to be safe... |
39 | 39 | if( !$frev && $rev && FlaggedRevs::inReviewNamespace( $title ) ) { |
40 | | - $text = $rev->getText(); |
41 | 40 | $article = new Article( $title ); |
42 | 41 | $db->begin(); |
43 | 42 | FlaggedRevs::autoReviewEdit( $article, $user, $rev, $flags, true ); |
Index: trunk/extensions/FlaggedRevs/maintenance/tests/FRInclusionManagerTest.php |
— | — | @@ -88,7 +88,7 @@ |
89 | 89 | public function testReviewedTemplateVersions() { |
90 | 90 | $im = FRInclusionManager::singleton(); |
91 | 91 | $im->setReviewedVersions( self::$inputTemplates, self::$inputFiles ); |
92 | | - foreach ( self::$reviewedOutputTemplates as $x => $triple ) { |
| 92 | + foreach ( self::$reviewedOutputTemplates as $triple ) { |
93 | 93 | list($test,$ns,$dbKey,$expId) = $triple; |
94 | 94 | $title = Title::makeTitleSafe( $ns, $dbKey ); |
95 | 95 | $actual = $im->getReviewedTemplateVersion( $title ); |
— | — | @@ -99,7 +99,7 @@ |
100 | 100 | public function testReviewedFileVersions() { |
101 | 101 | $im = FRInclusionManager::singleton(); |
102 | 102 | $im->setReviewedVersions( self::$inputTemplates, self::$inputFiles ); |
103 | | - foreach ( self::$reviewedOutputFiles as $x => $triple ) { |
| 103 | + foreach ( self::$reviewedOutputFiles as $triple ) { |
104 | 104 | list($test,$dbKey,$expTS,$expSha1) = $triple; |
105 | 105 | $title = Title::makeTitleSafe( NS_FILE, $dbKey ); |
106 | 106 | list($actualTS,$actualSha1) = $im->getReviewedFileVersion( $title ); |
— | — | @@ -112,7 +112,7 @@ |
113 | 113 | $im = FRInclusionManager::singleton(); |
114 | 114 | $im->setReviewedVersions( array(), array() ); |
115 | 115 | $im->setStableVersionCache( self::$inputTemplates, self::$inputFiles ); |
116 | | - foreach ( self::$stableOutputTemplates as $x => $triple ) { |
| 116 | + foreach ( self::$stableOutputTemplates as $triple ) { |
117 | 117 | list($test,$ns,$dbKey,$expId) = $triple; |
118 | 118 | $title = Title::makeTitleSafe( $ns, $dbKey ); |
119 | 119 | $actual = $im->getStableTemplateVersion( $title ); |
— | — | @@ -124,7 +124,7 @@ |
125 | 125 | $im = FRInclusionManager::singleton(); |
126 | 126 | $im->setReviewedVersions( array(), array() ); |
127 | 127 | $im->setStableVersionCache( self::$inputTemplates, self::$inputFiles ); |
128 | | - foreach ( self::$stableOutputFiles as $x => $triple ) { |
| 128 | + foreach ( self::$stableOutputFiles as $triple ) { |
129 | 129 | list($test,$dbKey,$expTS,$expSha1) = $triple; |
130 | 130 | $title = Title::makeTitleSafe( NS_FILE, $dbKey ); |
131 | 131 | list($actualTS,$actualSha1) = $im->getStableFileVersion( $title ); |
Index: trunk/extensions/FlaggedRevs/maintenance/flagToSemiProtect.inc |
— | — | @@ -46,7 +46,6 @@ |
47 | 47 | $limit = $expiry = array(); |
48 | 48 | $desc = array(); // for output |
49 | 49 | foreach ( $title->getRestrictionTypes() as $type ) { |
50 | | - $newLimit = $newExpiry = ''; |
51 | 50 | # Get existing restrictions for this action |
52 | 51 | $oldLimit = $title->getRestrictions( $type ); // array |
53 | 52 | $oldExpiry = $title->getRestrictionExpiry( $type ); // MW_TS |
Index: trunk/extensions/FlaggedRevs/maintenance/pruneRevData.inc |
— | — | @@ -26,7 +26,6 @@ |
27 | 27 | $tDeleted = $fDeleted = 0; // tallies |
28 | 28 | |
29 | 29 | $newerRevs = 50; |
30 | | - $cutoff = $db->timestamp( time() - 30*24*3600 ); |
31 | 30 | $cutoff = $db->timestamp( time() - 3600 ); |
32 | 31 | while( $blockEnd <= $end ) { |
33 | 32 | echo "...doing fp_page_id from $blockStart to $blockEnd\n"; |
Index: trunk/extensions/FlaggedRevs/forms/RevisionReviewForm.php |
— | — | @@ -718,7 +718,6 @@ |
719 | 719 | } |
720 | 720 | |
721 | 721 | # Get versions of templates/files used |
722 | | - $imageParams = $templateParams = $fileVersion = ''; |
723 | 722 | if ( $getPOut ) { |
724 | 723 | $pOutput = false; |
725 | 724 | # Current version: try parser cache |
— | — | @@ -804,14 +803,12 @@ |
805 | 804 | * Generates a main tag inputs (checkboxes/radios/selects) for review form |
806 | 805 | */ |
807 | 806 | private static function ratingInputs( $user, $flags, $disabled, $reviewed ) { |
808 | | - $form = ''; |
809 | 807 | # Get all available tags for this page/user |
810 | 808 | list( $labels, $minLevels ) = self::ratingFormTags( $user, $flags ); |
811 | 809 | if ( $labels === false ) { |
812 | 810 | $disabled = true; // a tag is unsettable |
813 | 811 | } |
814 | 812 | $dimensions = FlaggedRevs::getDimensions(); |
815 | | - $tags = array_keys( $dimensions ); |
816 | 813 | # If there are no tags, make one checkbox to approve/unapprove |
817 | 814 | if ( FlaggedRevs::binaryFlagging() ) { |
818 | 815 | return ''; |
Index: trunk/extensions/FlaggedRevs/FRExtraCacheUpdate.php |
— | — | @@ -38,10 +38,11 @@ |
39 | 39 | |
40 | 40 | protected function insertJobs( ResultWrapper $res ) { |
41 | 41 | $numRows = $res->numRows(); |
42 | | - if ( !$numRows ) return; // sanity check |
| 42 | + if ( !$numRows ) { |
| 43 | + return; // sanity check |
| 44 | + } |
43 | 45 | $numBatches = ceil( $numRows / $this->mRowsPerJob ); |
44 | 46 | $realBatchSize = ceil( $numRows / $numBatches ); |
45 | | - $start = false; |
46 | 47 | $jobs = array(); |
47 | 48 | do { |
48 | 49 | $first = $last = false; // first/last page_id of this batch |
Index: trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php |
— | — | @@ -53,7 +53,7 @@ |
54 | 54 | if ( !$fa || !$fa->isReviewable() ) { |
55 | 55 | return true; |
56 | 56 | } |
57 | | - global $wgJsMimeType, $wgFlaggedRevStyleVersion, $wgStylePath, $wgStyleVersion; |
| 57 | + global $wgJsMimeType, $wgFlaggedRevStyleVersion; |
58 | 58 | $stylePath = FlaggedRevs::styleUrlPath(); |
59 | 59 | # Get JS/CSS file locations |
60 | 60 | $encCssFile = htmlspecialchars( "$stylePath/flaggedrevs.css?$wgFlaggedRevStyleVersion" ); |
— | — | @@ -140,7 +140,7 @@ |
141 | 141 | } |
142 | 142 | $spPages = array( 'UnreviewedPages', 'PendingChanges', 'ProblemChanges', |
143 | 143 | 'Watchlist', 'Recentchanges', 'Contributions', 'Recentchangeslinked' ); |
144 | | - foreach ( $spPages as $n => $key ) { |
| 144 | + foreach ( $spPages as $key ) { |
145 | 145 | if ( $title->isSpecial( $key ) ) { |
146 | 146 | global $wgScriptPath, $wgFlaggedRevsStylePath, $wgFlaggedRevStyleVersion; |
147 | 147 | $stylePath = str_replace( '$wgScriptPath', |
— | — | @@ -887,7 +887,6 @@ |
888 | 888 | global $wgFlaggedRevsRCCrap; |
889 | 889 | if ( $wgFlaggedRevsRCCrap ) { |
890 | 890 | // Is this page in patrollable namespace? |
891 | | - $patrol = $record = false; |
892 | 891 | if ( FlaggedRevs::inPatrolNamespace( $rc->getTitle() ) ) { |
893 | 892 | # Bots and users with 'autopatrol' have edits to patrollable |
894 | 893 | # pages marked automatically on edit. |
Index: trunk/extensions/FlaggedRevs/FlaggedRevsLogs.php |
— | — | @@ -35,7 +35,6 @@ |
36 | 36 | if ( !$title ) { |
37 | 37 | return ''; // sanity check |
38 | 38 | } |
39 | | - $text = ''; |
40 | 39 | if ( $skin ) { |
41 | 40 | $titleLink = $skin->link( $title, $title->getPrefixedText() ); |
42 | 41 | $text = wfMsgHtml( "stable-logentry-{$action}", $titleLink ); |
Index: trunk/extensions/FlaggedRevs/api/ApiQueryFlagged.php |
— | — | @@ -44,7 +44,6 @@ |
45 | 45 | $res = $this->select( __METHOD__ ); |
46 | 46 | |
47 | 47 | $result = $this->getResult(); |
48 | | - $db = $this->getDB(); |
49 | 48 | foreach( $res as $row ) { |
50 | 49 | $pageid = $row->fp_page_id; |
51 | 50 | $data = array( |
Index: trunk/extensions/FlaggedRevs/api/ApiQueryOldreviewedpages.php |
— | — | @@ -108,7 +108,6 @@ |
109 | 109 | |
110 | 110 | $data = array (); |
111 | 111 | $count = 0; |
112 | | - $db = $this->getDB(); |
113 | 112 | foreach( $res as $row ) { |
114 | 113 | if ( ++$count > $limit ) { |
115 | 114 | // We've reached the one extra which shows that there are |
Index: trunk/extensions/FlaggedRevs/api/ApiQueryReviewedpages.php |
— | — | @@ -86,7 +86,6 @@ |
87 | 87 | |
88 | 88 | $data = array (); |
89 | 89 | $count = 0; |
90 | | - $db = $this->getDB(); |
91 | 90 | foreach( $res as $row ) { |
92 | 91 | if ( ++$count > $limit ) { |
93 | 92 | // We've reached the one extra which shows that there are |
Index: trunk/extensions/FlaggedRevs/api/ApiQueryUnreviewedpages.php |
— | — | @@ -85,7 +85,6 @@ |
86 | 86 | |
87 | 87 | $data = array (); |
88 | 88 | $count = 0; |
89 | | - $db = $this->getDB(); |
90 | 89 | foreach( $res as $row ) { |
91 | 90 | if ( ++$count > $limit ) { |
92 | 91 | // We've reached the one extra which shows that there are |
Index: trunk/extensions/FlaggedRevs/FRInclusionManager.php |
— | — | @@ -67,7 +67,6 @@ |
68 | 68 | * @return void |
69 | 69 | */ |
70 | 70 | public function stabilizeParserOutput( Title $title, FlaggedRevision $frev ) { |
71 | | - $tRevVersions = $fRevVersions = array(); // review time versions |
72 | 71 | $tStbVersions = $fStbVersions = array(); // stable versions |
73 | 72 | $tRevVersions = $frev->getTemplateVersions(); |
74 | 73 | $fRevVersions = $frev->getFileVersions(); |
Index: trunk/extensions/FlaggedRevs/FlaggedArticleView.php |
— | — | @@ -620,7 +620,6 @@ |
621 | 621 | $this->setReviewNotes( $srev ); |
622 | 622 | |
623 | 623 | # Get parsed stable version and output HTML |
624 | | - $redirHtml = ''; |
625 | 624 | $parserOut = FlaggedRevs::getPageCache( $this->article, $wgUser ); |
626 | 625 | if ( !$parserOut ) { |
627 | 626 | $text = $srev->getRevText(); |
— | — | @@ -867,7 +866,6 @@ |
868 | 867 | return true; |
869 | 868 | } |
870 | 869 | $items = array(); |
871 | | - $tag = $warning = $prot = ''; |
872 | 870 | # Show stabilization log |
873 | 871 | $log = $this->stabilityLogNotice(); |
874 | 872 | if ( $log ) $items[] = $log; |
— | — | @@ -1474,7 +1472,6 @@ |
1475 | 1473 | } |
1476 | 1474 | |
1477 | 1475 | protected static function getDiffRevMsgAndClass( Revision $rev, $stableId ) { |
1478 | | - $msg = ''; |
1479 | 1476 | $tier = FlaggedRevs::getRevQuality( $rev->getPage(), $rev->getId() ); |
1480 | 1477 | if ( $tier !== false ) { |
1481 | 1478 | $msg = $tier |