Index: trunk/extensions/FlaggedRevs/FRUserCounters.php |
— | — | @@ -71,7 +71,7 @@ |
72 | 72 | */ |
73 | 73 | public static function saveUserParams( $uid, array $params, $dBName = false ) { |
74 | 74 | $dbw = wfGetDB( DB_MASTER, array(), $dBName ); |
75 | | - $row = $dbw->replace( 'flaggedrevs_promote', |
| 75 | + $dbw->replace( 'flaggedrevs_promote', |
76 | 76 | array( 'frp_user_id' ), |
77 | 77 | array( 'frp_user_id' => $uid, |
78 | 78 | 'frp_user_params' => self::flattenParams( $params ) ), |
Index: trunk/extensions/FlaggedRevs/maintenance/tests/FRUserCountersTest.php |
— | — | @@ -58,15 +58,15 @@ |
59 | 59 | $article = new Article( $title ); |
60 | 60 | |
61 | 61 | $copyP = $p; |
62 | | - $changed = FRUserCounters::updateUserParams( $copyP, $article, "Manual edit comment" ); |
| 62 | + FRUserCounters::updateUserParams( $copyP, $article, "Manual edit comment" ); |
63 | 63 | $this->assertEquals( $p['editComments']+1, $copyP['editComments'], "Manual summary" ); |
64 | 64 | |
65 | 65 | $copyP = $p; |
66 | | - $changed = FRUserCounters::updateUserParams( $copyP, $article, "/* section */" ); |
| 66 | + FRUserCounters::updateUserParams( $copyP, $article, "/* section */" ); |
67 | 67 | $this->assertEquals( $p['editComments'], $copyP['editComments'], "Auto summary" ); |
68 | 68 | |
69 | 69 | $copyP = $p; |
70 | | - $changed = FRUserCounters::updateUserParams( $copyP, $article, "edit summary" ); |
| 70 | + FRUserCounters::updateUserParams( $copyP, $article, "edit summary" ); |
71 | 71 | $this->assertEquals( $p['totalContentEdits']+1, $copyP['totalContentEdits'], |
72 | 72 | "Content edit count on content edit" ); |
73 | 73 | $expected = $p['uniqueContentPages']; |
— | — | @@ -79,15 +79,15 @@ |
80 | 80 | $article = new Article( $title ); |
81 | 81 | |
82 | 82 | $copyP = $p; |
83 | | - $changed = FRUserCounters::updateUserParams( $copyP, $article, "Manual edit comment" ); |
| 83 | + FRUserCounters::updateUserParams( $copyP, $article, "Manual edit comment" ); |
84 | 84 | $this->assertEquals( $p['editComments']+1, $copyP['editComments'], "Manual summary" ); |
85 | 85 | |
86 | 86 | $copyP = $p; |
87 | | - $changed = FRUserCounters::updateUserParams( $copyP, $article, "/* section */" ); |
| 87 | + FRUserCounters::updateUserParams( $copyP, $article, "/* section */" ); |
88 | 88 | $this->assertEquals( $p['editComments'], $copyP['editComments'], "Auto summary" ); |
89 | 89 | |
90 | 90 | $copyP = $p; |
91 | | - $changed = FRUserCounters::updateUserParams( $copyP, $article, "edit summary" ); |
| 91 | + FRUserCounters::updateUserParams( $copyP, $article, "edit summary" ); |
92 | 92 | $this->assertEquals( $p['totalContentEdits'], $copyP['totalContentEdits'], |
93 | 93 | "Content edit count on non-content edit" ); |
94 | 94 | $this->assertEquals( $p['uniqueContentPages'], $copyP['uniqueContentPages'], |
Index: trunk/extensions/FlaggedRevs/maintenance/updateStats.inc |
— | — | @@ -184,7 +184,6 @@ |
185 | 185 | if ( $rows < 500 ) { |
186 | 186 | $days = 90; |
187 | 187 | $minTSUnix = $maxTSUnix - $days*86400; |
188 | | - $encMinTS = $dbr->addQuotes( $dbr->timestamp( $minTSUnix ) ); |
189 | 188 | } |
190 | 189 | } |
191 | 190 | $sampleSize = 1500; // sample size |
Index: trunk/extensions/FlaggedRevs/forms/PageStabilityForm.php |
— | — | @@ -328,7 +328,7 @@ |
329 | 329 | # Insert a null revision... |
330 | 330 | $dbw = wfGetDB( DB_MASTER ); |
331 | 331 | $nullRev = Revision::newNullRevision( $dbw, $article->getId(), $comment, true ); |
332 | | - $nullRevId = $nullRev->insertOn( $dbw ); |
| 332 | + $nullRev->insertOn( $dbw ); |
333 | 333 | # Update page record and touch page |
334 | 334 | $article->updateRevisionOn( $dbw, $nullRev, $latest ); |
335 | 335 | wfRunHooks( 'NewRevisionFromEditComplete', array( $article, $nullRev, $latest ) ); |
Index: trunk/extensions/FlaggedRevs/specialpages/RevisionReview_body.php |
— | — | @@ -143,7 +143,7 @@ |
144 | 144 | $editToken = ''; // edit token |
145 | 145 | // Each ajax url argument is of the form param|val. |
146 | 146 | // This means that there is no ugly order dependance. |
147 | | - foreach ( $args as $x => $arg ) { |
| 147 | + foreach ( $args as $arg ) { |
148 | 148 | $set = explode( '|', $arg, 2 ); |
149 | 149 | if ( count( $set ) != 2 ) { |
150 | 150 | return '<err#>' . wfMsgExt( 'revreview-failed', 'parseinline' ); |
Index: trunk/extensions/FlaggedRevs/FlaggedRevsXML.php |
— | — | @@ -186,14 +186,7 @@ |
187 | 187 | $level = isset( $flags[$quality] ) ? $flags[$quality] : 0; |
188 | 188 | $encValueText = wfMsgHtml( "revreview-$quality-$level" ); |
189 | 189 | $level = $flags[$quality]; |
190 | | - $minlevel = FlaggedRevs::getMinQL( $quality ); |
191 | | - if ( $level >= $minlevel ) { |
192 | | - $classmarker = 2; |
193 | | - } elseif ( $level > 0 ) { |
194 | | - $classmarker = 1; |
195 | | - } else { |
196 | | - $classmarker = 0; |
197 | | - } |
| 190 | + |
198 | 191 | $levelmarker = $level * 20 + 20; |
199 | 192 | if ( $prettyBox ) { |
200 | 193 | $tag .= "<tr><td class='fr-text' valign='middle'>" . |
Index: trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php |
— | — | @@ -483,7 +483,6 @@ |
484 | 484 | if ( isset( $pOutput->fr_fileSHA1Keys[$filename] ) ) { |
485 | 485 | // Fetch file with $time to confirm the specified version exists |
486 | 486 | $time = $pOutput->fr_fileSHA1Keys[$filename]['ts']; |
487 | | - $sha1 = $pOutput->fr_fileSHA1Keys[$filename]['sha1']; |
488 | 487 | } |
489 | 488 | $title = Title::makeTitleSafe( NS_FILE, $filename ); |
490 | 489 | $file = wfFindFile( $title, array( 'time' => $time ) ); |
— | — | @@ -1946,7 +1945,6 @@ |
1947 | 1946 | $output .= Xml::closeElement( 'select' ); |
1948 | 1947 | # Get expiry dropdown <select>... |
1949 | 1948 | $scExpiryOptions = wfMsgForContent( 'protect-expiry-options' ); |
1950 | | - $showProtectOptions = ( $scExpiryOptions !== '-' && $isAllowed ); |
1951 | 1949 | # Add the current expiry as an option |
1952 | 1950 | $expiryFormOptions = ''; |
1953 | 1951 | if ( $config['expiry'] != 'infinity' ) { |
Index: trunk/extensions/FlaggedRevs/FlaggedArticleView.php |
— | — | @@ -224,7 +224,7 @@ |
225 | 225 | * Adds a quick review form on the bottom if needed |
226 | 226 | */ |
227 | 227 | public function setPageContent( &$outputDone, &$useParserCache ) { |
228 | | - global $wgRequest, $wgOut, $wgLang, $wgContLang; |
| 228 | + global $wgRequest, $wgOut, $wgContLang; |
229 | 229 | $this->load(); |
230 | 230 | # Only trigger on article view for content pages, not for protect/delete/hist... |
231 | 231 | $action = $wgRequest->getVal( 'action', 'view' ); |
— | — | @@ -239,7 +239,7 @@ |
240 | 240 | return true; |
241 | 241 | } |
242 | 242 | $simpleTag = $old = $stable = false; |
243 | | - $tag = $prot = ''; |
| 243 | + $tag = ''; |
244 | 244 | # Check the newest stable version. |
245 | 245 | $srev = $this->article->getStableRev(); |
246 | 246 | $stableId = $srev ? $srev->getRevId() : 0; |
— | — | @@ -279,7 +279,6 @@ |
280 | 280 | return true; |
281 | 281 | } |
282 | 282 | # Get flags and date |
283 | | - $time = $wgLang->date( $frev->getTimestamp(), true ); |
284 | 283 | $flags = $frev->getTags(); |
285 | 284 | # Get quality level |
286 | 285 | $quality = FlaggedRevs::isQuality( $flags ); |
— | — | @@ -384,7 +383,6 @@ |
385 | 384 | $time = $wgLang->date( $srev->getTimestamp(), true ); |
386 | 385 | # Get quality level |
387 | 386 | $quality = FlaggedRevs::isQuality( $flags ); |
388 | | - $pristine = FlaggedRevs::isPristine( $flags ); |
389 | 387 | # Get stable version sync status |
390 | 388 | $synced = $this->article->stableVersionIsSynced(); |
391 | 389 | if ( $synced ) { |
— | — | @@ -393,7 +391,6 @@ |
394 | 392 | $this->maybeShowTopDiff( $srev, $quality ); // user may want diff (via prefs) |
395 | 393 | } |
396 | 394 | # If they are synced, do special styling |
397 | | - $simpleTag = !$synced; |
398 | 395 | # Give notice to newer users if an unreviewed edit was completed... |
399 | 396 | if ( $wgRequest->getVal( 'shownotice' ) |
400 | 397 | && $this->article->getUserText() == $wgUser->getName() // FIXME: rawUserText? |
— | — | @@ -401,7 +398,6 @@ |
402 | 399 | && !$wgUser->isAllowed( 'review' ) ) |
403 | 400 | { |
404 | 401 | $revsSince = $this->article->getPendingRevCount(); |
405 | | - $tooltip = wfMsgHtml( 'revreview-draft-title' ); |
406 | 402 | $pending = $prot; |
407 | 403 | if ( $this->showRatingIcon() ) { |
408 | 404 | $pending .= FlaggedRevsXML::draftStatusIcon(); |
— | — | @@ -493,7 +489,6 @@ |
494 | 490 | $wgOut->setRevisionId( $frev->getRevId() ); |
495 | 491 | # Get quality level |
496 | 492 | $quality = FlaggedRevs::isQuality( $flags ); |
497 | | - $pristine = FlaggedRevs::isPristine( $flags ); |
498 | 493 | |
499 | 494 | # Construct some tagging for non-printable outputs. Note that the pending |
500 | 495 | # notice has all this info already, so don't do this if we added that already. |
— | — | @@ -568,7 +563,6 @@ |
569 | 564 | $wgOut->setRevisionId( $srev->getRevId() ); |
570 | 565 | # Get quality level |
571 | 566 | $quality = FlaggedRevs::isQuality( $flags ); |
572 | | - $pristine = FlaggedRevs::isPristine( $flags ); |
573 | 567 | |
574 | 568 | $synced = $this->article->stableVersionIsSynced(); |
575 | 569 | # Construct some tagging |
— | — | @@ -870,7 +864,6 @@ |
871 | 865 | $log = $this->stabilityLogNotice(); |
872 | 866 | if ( $log ) $items[] = $log; |
873 | 867 | # Check the newest stable version |
874 | | - $quality = 0; |
875 | 868 | $frev = $this->article->getStableRev(); |
876 | 869 | if ( $frev ) { |
877 | 870 | $quality = $frev->getQuality(); |
— | — | @@ -1437,13 +1430,7 @@ |
1438 | 1431 | */ |
1439 | 1432 | protected static function diffReviewMarkers( FlaggedArticle $article, $oldRev, $newRev ) { |
1440 | 1433 | $form = ''; |
1441 | | - $oldRevQ = $newRevQ = false; |
1442 | | - if ( $oldRev ) { |
1443 | | - $oldRevQ = FlaggedRevs::getRevQuality( $oldRev->getPage(), $oldRev->getId() ); |
1444 | | - } |
1445 | | - if ( $newRev ) { |
1446 | | - $newRevQ = FlaggedRevs::getRevQuality( $newRev->getPage(), $newRev->getId() ); |
1447 | | - } |
| 1434 | + |
1448 | 1435 | $srev = $article->getStableRev(); |
1449 | 1436 | $stableId = $srev ? $srev->getRevId() : 0; |
1450 | 1437 | # Diff between two revisions |
— | — | @@ -1628,7 +1615,7 @@ |
1629 | 1616 | return true; # PECL extension conflicts with the core DOM extension (see bug 13770) |
1630 | 1617 | } elseif ( isset( $buttons['save'] ) && extension_loaded( 'dom' ) ) { |
1631 | 1618 | $dom = new DOMDocument(); |
1632 | | - $result = $dom->loadXML( $buttons['save'] ); // load button XML from hook |
| 1619 | + $dom->loadXML( $buttons['save'] ); // load button XML from hook |
1633 | 1620 | foreach ( $dom->getElementsByTagName( 'input' ) as $input ) { // one <input> |
1634 | 1621 | $input->setAttribute( 'value', wfMsg( 'revreview-submitedit' ) ); |
1635 | 1622 | $input->setAttribute( 'title', // keep accesskey |
— | — | @@ -1662,7 +1649,6 @@ |
1663 | 1650 | * @return bool |
1664 | 1651 | */ |
1665 | 1652 | protected function editRequiresReview( EditPage $editPage ) { |
1666 | | - $title = $this->article->getTitle(); // convenience |
1667 | 1653 | if ( !$this->article->editsRequireReview() ) { |
1668 | 1654 | return false; // edits go live immediatly |
1669 | 1655 | } elseif ( $this->editWillBeAutoreviewed( $editPage ) ) { |