r102816 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r102815‎ | r102816 | r102817 >
Date:21:39, 11 November 2011
Author:aaron
Status:ok
Tags:
Comment:
Comment w/s cleanup and tweaks
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.setup.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/backend/FRDependencyUpdate.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/backend/FRUserActivity.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/backend/FRUserCounters.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/backend/FlaggableWikiPage.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/backend/FlaggedRevision.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/backend/FlaggedRevs.class.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/backend/FlaggedRevs.hooks.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/backend/FlaggedRevsLog.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/backend/FlaggedRevsStats.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/business/FRGenericSubmitForm.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/business/PageStabilityForm.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/business/RevisionReviewForm.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/frontend/FlaggablePageView.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/frontend/FlaggedRevsLogView.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/frontend/FlaggedRevsUI.hooks.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/frontend/FlaggedRevsXML.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/frontend/RevisionReviewFormUI.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/frontend/modules/ext.flaggedRevs.review.js (modified) (history)
  • /trunk/extensions/FlaggedRevs/frontend/specialpages/reports/ConfiguredPages_body.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/frontend/specialpages/reports/QualityOversight_body.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/frontend/specialpages/reports/UnreviewedPages_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/frontend/FlaggedRevsUI.hooks.php
@@ -4,8 +4,8 @@
55 */
66 class FlaggedRevsUIHooks {
77 /**
8 - * Add FlaggedRevs css/js.
9 - */
 8+ * Add FlaggedRevs css/js.
 9+ */
1010 protected static function injectStyleAndJS() {
1111 global $wgOut, $wgUser;
1212 static $loadedModules = false;
@@ -46,9 +46,9 @@
4747 }
4848
4949 /**
50 - * Add FlaggedRevs css for relevant special pages.
51 - * @param OutputPage $out
52 - */
 50+ * Add FlaggedRevs css for relevant special pages.
 51+ * @param OutputPage $out
 52+ */
5353 protected static function injectStyleForSpecial( &$out ) {
5454 $title = $out->getTitle();
5555 $spPages = array( 'UnreviewedPages', 'PendingChanges', 'ProblemChanges',
@@ -63,8 +63,8 @@
6464 }
6565
6666 /*
67 - * Add tag notice, CSS/JS, protect form link, and set robots policy
68 - */
 67+ * Add tag notice, CSS/JS, protect form link, and set robots policy
 68+ */
6969 public static function onBeforePageDisplay( &$out, &$skin ) {
7070 if ( $out->getTitle()->getNamespace() != NS_SPECIAL ) {
7171 $view = FlaggablePageView::singleton();
Index: trunk/extensions/FlaggedRevs/frontend/FlaggedRevsXML.php
@@ -347,9 +347,9 @@
348348 }
349349
350350 /*
351 - * Creates CSS draft page icon
352 - * @return string
353 - */
 351+ * Creates CSS draft page icon
 352+ * @return string
 353+ */
354354 public static function draftStatusIcon() {
355355 $encPath = htmlspecialchars( FlaggedRevs::styleUrlPath() . '/img' );
356356 $encTitle = wfMsgHtml( 'revreview-draft-title' );
@@ -358,10 +358,10 @@
359359 }
360360
361361 /*
362 - * Creates CSS stable page icon
363 - * @param bool $isQuality
364 - * @return string
365 - */
 362+ * Creates CSS stable page icon
 363+ * @param bool $isQuality
 364+ * @return string
 365+ */
366366 public static function stableStatusIcon( $isQuality ) {
367367 $encPath = htmlspecialchars( FlaggedRevs::styleUrlPath() . '/img' );
368368 $file = $isQuality ? '3.png' : '2.png';
@@ -373,10 +373,10 @@
374374 }
375375
376376 /*
377 - * Creates CSS lock icon if page is locked/unlocked
378 - * @param FlaggableWikiPage $flaggedArticle
379 - * @return string
380 - */
 377+ * Creates CSS lock icon if page is locked/unlocked
 378+ * @param FlaggableWikiPage $flaggedArticle
 379+ * @return string
 380+ */
381381 public static function lockStatusIcon( $flaggedArticle ) {
382382 $encPath = htmlspecialchars( FlaggedRevs::styleUrlPath() . '/img' );
383383 if ( $flaggedArticle->isPageLocked() ) {
@@ -391,12 +391,12 @@
392392 }
393393
394394 /*
395 - * @param FlaggableWikiPage $flaggedArticle
396 - * @param FlaggedRevision $frev
397 - * @param int $revsSince
398 - * @return string
399 - * Creates "stable rev reviewed on"/"x pending edits" message
400 - */
 395+ * @param FlaggableWikiPage $flaggedArticle
 396+ * @param FlaggedRevision $frev
 397+ * @param int $revsSince
 398+ * @return string
 399+ * Creates "stable rev reviewed on"/"x pending edits" message
 400+ */
401401 public static function pendingEditNotice( $flaggedArticle, $frev, $revsSince ) {
402402 global $wgLang;
403403 $flags = $frev->getTags();
@@ -410,10 +410,10 @@
411411 }
412412
413413 /*
414 - * @param Page $article
415 - * @return string
416 - * Creates a stability log excerpt
417 - */
 414+ * @param Page $article
 415+ * @return string
 416+ * Creates a stability log excerpt
 417+ */
418418 public static function stabilityLogExcerpt( $article ) {
419419 $logHtml = '';
420420 $params = array(
Index: trunk/extensions/FlaggedRevs/frontend/specialpages/reports/UnreviewedPages_body.php
@@ -189,9 +189,9 @@
190190 }
191191
192192 /*
193 - * Run an update to the cached query rows
194 - * @return void
195 - */
 193+ * Run an update to the cached query rows
 194+ * @return void
 195+ */
196196 public static function updateQueryCache() {
197197 $rNamespaces = FlaggedRevs::getReviewNamespaces();
198198 if ( empty( $rNamespaces ) ) {
Index: trunk/extensions/FlaggedRevs/frontend/specialpages/reports/QualityOversight_body.php
@@ -85,9 +85,9 @@
8686 }
8787
8888 /*
89 - * Get actions for IN clause
90 - * @return array
91 - */
 89+ * Get actions for IN clause
 90+ * @return array
 91+ */
9292 private function getActions() {
9393 $actions = array(
9494 'approve' => 1, 'approve2' => 1, 'approve-a' => 1, 'approve-i' => 1,
Index: trunk/extensions/FlaggedRevs/frontend/specialpages/reports/ConfiguredPages_body.php
@@ -117,10 +117,10 @@
118118 public $mForm, $mConds, $namespace, $override, $autoreview;
119119
120120 /*
121 - * @param int $namespace (null for "all")
122 - * @param int $override (null for "either")
123 - * @param string $autoreview ('' for "all", 'none' for no restriction)
124 - */
 121+ * @param int $namespace (null for "all")
 122+ * @param int $override (null for "either")
 123+ * @param string $autoreview ('' for "all", 'none' for no restriction)
 124+ */
125125 function __construct( $form, $conds = array(), $namespace, $override, $autoreview ) {
126126 $this->mForm = $form;
127127 $this->mConds = $conds;
Index: trunk/extensions/FlaggedRevs/frontend/FlaggablePageView.php
@@ -21,8 +21,8 @@
2222 protected static $instance = null;
2323
2424 /*
25 - * Get the FlaggablePageView for this request
26 - */
 25+ * Get the FlaggablePageView for this request
 26+ */
2727 public static function singleton() {
2828 if ( self::$instance == null ) {
2929 self::$instance = new self();
@@ -33,16 +33,16 @@
3434 protected function __clone() { }
3535
3636 /*
37 - * Clear the FlaggablePageView for this request.
38 - * Only needed when page redirection changes the environment.
39 - */
 37+ * Clear the FlaggablePageView for this request.
 38+ * Only needed when page redirection changes the environment.
 39+ */
4040 public function clear() {
4141 self::$instance = null;
4242 }
4343
4444 /*
45 - * Load the global FlaggableWikiPage instance
46 - */
 45+ * Load the global FlaggableWikiPage instance
 46+ */
4747 protected function load() {
4848 if ( !$this->loaded ) {
4949 $this->loaded = true;
@@ -179,7 +179,7 @@
180180 return false;
181181 }
182182
183 - /**
 183+ /**
184184 * Is this a view page action (including diffs)?
185185 * @param $request WebRequest
186186 * @return bool
@@ -192,7 +192,7 @@
193193 return self::isViewAction( $action );
194194 }
195195
196 - /**
 196+ /**
197197 * Is this a view page action (not including diffs)?
198198 * @param $request WebRequest
199199 * @return bool
@@ -202,7 +202,7 @@
203203 && $request->getVal( 'diff' ) === null;
204204 }
205205
206 - /**
 206+ /**
207207 * Is this a web request to just *view* the *default* version of a page?
208208 * @param $request WebRequest
209209 * @return bool
@@ -220,7 +220,7 @@
221221 );
222222 }
223223
224 - /**
 224+ /**
225225 * Is this a view page action?
226226 * @param $action string from MediaWiki::getAction()
227227 * @return bool
@@ -229,7 +229,7 @@
230230 return ( $action == 'view' || $action == 'purge' || $action == 'render' );
231231 }
232232
233 - /**
 233+ /**
234234 * Output review notice
235235 */
236236 public function displayTag() {
@@ -241,7 +241,7 @@
242242 return true;
243243 }
244244
245 - /**
 245+ /**
246246 * Add a stable link when viewing old versions of an article that
247247 * have been reviewed. (e.g. for &oldid=x urls)
248248 */
@@ -276,8 +276,8 @@
277277 }
278278
279279 /**
280 - * @return mixed int/false/null
281 - */
 280+ * @return mixed int/false/null
 281+ */
282282 protected function getRequestedStableId() {
283283 $request = $this->getRequest();
284284 $reqId = $request->getVal( 'stableid' );
@@ -287,7 +287,7 @@
288288 return $reqId;
289289 }
290290
291 - /**
 291+ /**
292292 * Replaces a page with the last stable version if possible
293293 * Adds stable version status/info tags and notes
294294 * Adds a quick review form on the bottom if needed
@@ -386,11 +386,11 @@
387387 }
388388
389389 /**
390 - * If the page has a stable version and it shows by default,
391 - * tell search crawlers to index only that version of the page.
392 - * Also index the draft as well if they are synced (bug 27173).
393 - * However, any URL with ?stableid=x should not be indexed (as with ?oldid=x).
394 - */
 390+ * If the page has a stable version and it shows by default,
 391+ * tell search crawlers to index only that version of the page.
 392+ * Also index the draft as well if they are synced (bug 27173).
 393+ * However, any URL with ?stableid=x should not be indexed (as with ?oldid=x).
 394+ */
395395 public function setRobotPolicy() {
396396 $request = $this->getRequest();
397397 if ( $this->article->getStableRev() && $this->article->isStableShownByDefault() ) {
@@ -407,10 +407,10 @@
408408 }
409409
410410 /**
411 - * @param $tag review box/bar info
412 - * @param $prot protection notice
413 - * Tag output function must be called by caller
414 - */
 411+ * @param $tag review box/bar info
 412+ * @param $prot protection notice
 413+ * Tag output function must be called by caller
 414+ */
415415 protected function showUnreviewedPage( $tag, $prot ) {
416416 if ( $this->out->isPrintable() ) {
417417 return; // all this function does is add notices; don't show them
@@ -432,13 +432,13 @@
433433 }
434434
435435 /**
436 - * Tag output function must be called by caller
437 - * Parser cache control deferred to caller
438 - * @param $srev stable version
439 - * @param $tag review box/bar info
440 - * @param $prot protection notice icon
441 - * @return void
442 - */
 436+ * Tag output function must be called by caller
 437+ * Parser cache control deferred to caller
 438+ * @param $srev stable version
 439+ * @param $tag review box/bar info
 440+ * @param $prot protection notice icon
 441+ * @return void
 442+ */
443443 protected function showDraftVersion( FlaggedRevision $srev, &$tag, $prot ) {
444444 $request = $this->getRequest();
445445 $reqUser = $this->getUser();
@@ -544,14 +544,14 @@
545545 }
546546
547547 /**
548 - * Tag output function must be called by caller
549 - * Parser cache control deferred to caller
550 - * @param $srev stable version
551 - * @param $frev selected flagged revision
552 - * @param $tag review box/bar info
553 - * @param $prot protection notice icon
554 - * @return ParserOutput
555 - */
 548+ * Tag output function must be called by caller
 549+ * Parser cache control deferred to caller
 550+ * @param $srev stable version
 551+ * @param $frev selected flagged revision
 552+ * @param $tag review box/bar info
 553+ * @param $prot protection notice icon
 554+ * @return ParserOutput
 555+ */
556556 protected function showOldReviewedVersion( FlaggedRevision $frev, &$tag, $prot ) {
557557 $reqUser = $this->getUser();
558558 $this->load();
@@ -623,13 +623,13 @@
624624 }
625625
626626 /**
627 - * Tag output function must be called by caller
628 - * Parser cache control deferred to caller
629 - * @param $srev stable version
630 - * @param $tag review box/bar info
631 - * @param $prot protection notice
632 - * @return ParserOutput
633 - */
 627+ * Tag output function must be called by caller
 628+ * Parser cache control deferred to caller
 629+ * @param $srev stable version
 630+ * @param $tag review box/bar info
 631+ * @param $prot protection notice
 632+ * @return ParserOutput
 633+ */
634634 protected function showStableVersion( FlaggedRevision $srev, &$tag, $prot ) {
635635 $reqUser = $this->getUser();
636636 $this->load();
@@ -750,11 +750,11 @@
751751 }
752752
753753 /**
754 - * Get collapsible diff-to-stable html to add to the review notice as needed
755 - * @param FlaggedRevision $srev, stable version
756 - * @param bool $quality, revision is quality
757 - * @return string, the html line (either "" or "<diff toggle><diff div>")
758 - */
 754+ * Get collapsible diff-to-stable html to add to the review notice as needed
 755+ * @param FlaggedRevision $srev, stable version
 756+ * @param bool $quality, revision is quality
 757+ * @return string, the html line (either "" or "<diff toggle><diff div>")
 758+ */
759759 protected function getTopDiffToggle( FlaggedRevision $srev, $quality ) {
760760 $reqUser = $this->getUser();
761761 $this->load();
@@ -1052,7 +1052,7 @@
10531053 return true;
10541054 }
10551055
1056 - /**
 1056+ /**
10571057 * Add review form to pages when necessary on a regular page view (action=view).
10581058 * If $output is an OutputPage then this prepends the form onto it.
10591059 * If $output is a string then this appends the review form to it.
@@ -1127,7 +1127,7 @@
11281128 return true;
11291129 }
11301130
1131 - /**
 1131+ /**
11321132 * Add link to stable version setting to protection form
11331133 */
11341134 public function addStabilizationLink() {
@@ -1364,13 +1364,13 @@
13651365 }
13661366
13671367 /**
1368 - * When viewing a diff:
1369 - * (a) Add the review form to the top of the page
1370 - * (b) Mark off which versions are checked or not
1371 - * (c) When comparing the stable revision to the current:
1372 - * (i) Show a tag with some explanation for the diff
1373 - * (ii) List any template/file changes pending review
1374 - */
 1368+ * When viewing a diff:
 1369+ * (a) Add the review form to the top of the page
 1370+ * (b) Mark off which versions are checked or not
 1371+ * (c) When comparing the stable revision to the current:
 1372+ * (i) Show a tag with some explanation for the diff
 1373+ * (ii) List any template/file changes pending review
 1374+ */
13751375 public function addToDiffView( $diff, $oldRev, $newRev ) {
13761376 global $wgMemc, $wgParserCacheExpireTime;
13771377 $request = $this->getRequest();
@@ -1489,10 +1489,10 @@
14901490 }
14911491
14921492 /**
1493 - * (a) Add a link to diff from stable to current as needed
1494 - * (b) Show review status of the diff revision(s). Uses a <table>.
1495 - * Note: used by ajax function to rebuild diff page
1496 - */
 1493+ * (a) Add a link to diff from stable to current as needed
 1494+ * (b) Show review status of the diff revision(s). Uses a <table>.
 1495+ * Note: used by ajax function to rebuild diff page
 1496+ */
14971497 public static function diffLinkAndMarkers( FlaggableWikiPage $article, $oldRev, $newRev ) {
14981498 $s = '<form id="mw-fr-diff-dataform">';
14991499 $s .= Html::hidden( 'oldid', $oldRev ? $oldRev->getId() : 0 );
@@ -1506,8 +1506,8 @@
15071507 }
15081508
15091509 /**
1510 - * Add a link to diff-to-stable for reviewable pages
1511 - */
 1510+ * Add a link to diff-to-stable for reviewable pages
 1511+ */
15121512 protected static function diffToStableLink(
15131513 FlaggableWikiPage $article, $oldRev, Revision $newRev
15141514 ) {
@@ -1535,8 +1535,8 @@
15361536 }
15371537
15381538 /**
1539 - * Add [checked version] and such to left and right side of diff
1540 - */
 1539+ * Add [checked version] and such to left and right side of diff
 1540+ */
15411541 protected static function diffReviewMarkers( FlaggableWikiPage $article, $oldRev, $newRev ) {
15421542 $table = '';
15431543 $srev = $article->getStableRev();
@@ -1628,9 +1628,9 @@
16291629 }
16301630
16311631 /**
1632 - * Set $this->isDiffFromStable and $this->isMultiPageDiff fields
1633 - * Note: $oldRev could be false
1634 - */
 1632+ * Set $this->isDiffFromStable and $this->isMultiPageDiff fields
 1633+ * Note: $oldRev could be false
 1634+ */
16351635 public function setViewFlags( $diff, $oldRev, $newRev ) {
16361636 $this->load();
16371637 // We only want valid diffs that actually make sense...
@@ -1668,9 +1668,9 @@
16691669 }
16701670
16711671 /**
1672 - * Redirect users out to review the changes to the stable version.
1673 - * Only for people who can review and for pages that have a stable version.
1674 - */
 1672+ * Redirect users out to review the changes to the stable version.
 1673+ * Only for people who can review and for pages that have a stable version.
 1674+ */
16751675 public function injectPostEditURLParams( &$sectionAnchor, &$extraQuery ) {
16761676 $reqUser = $this->getUser();
16771677 $this->load();
@@ -1713,10 +1713,10 @@
17141714 }
17151715
17161716 /**
1717 - * If submitting the edit will leave it pending, then change the button text
1718 - * Note: interacts with 'review pending changes' checkbox
1719 - * @TODO: would be nice if hook passed in button attribs, not XML
1720 - */
 1717+ * If submitting the edit will leave it pending, then change the button text
 1718+ * Note: interacts with 'review pending changes' checkbox
 1719+ * @TODO: would be nice if hook passed in button attribs, not XML
 1720+ */
17211721 public function changeSaveButton( EditPage $editPage, array &$buttons ) {
17221722 if ( !$this->editWillRequireReview( $editPage ) ) {
17231723 return true; // edit will go live or be reviewed on save
@@ -1740,10 +1740,10 @@
17411741 }
17421742
17431743 /**
1744 - * If this edit will not go live on submit (accounting for wpReviewEdit)
1745 - * @param EditPage $editPage
1746 - * @return bool
1747 - */
 1744+ * If this edit will not go live on submit (accounting for wpReviewEdit)
 1745+ * @param EditPage $editPage
 1746+ * @return bool
 1747+ */
17481748 protected function editWillRequireReview( EditPage $editPage ) {
17491749 $request = $this->getRequest();
17501750 $title = $this->article->getTitle(); // convenience
@@ -1756,10 +1756,10 @@
17571757 }
17581758
17591759 /**
1760 - * If this edit will not go live on submit unless wpReviewEdit is checked
1761 - * @param EditPage $editPage
1762 - * @return bool
1763 - */
 1760+ * If this edit will not go live on submit unless wpReviewEdit is checked
 1761+ * @param EditPage $editPage
 1762+ * @return bool
 1763+ */
17641764 protected function editRequiresReview( EditPage $editPage ) {
17651765 if ( !$this->article->editsRequireReview() ) {
17661766 return false; // edits go live immediatly
@@ -1770,11 +1770,11 @@
17711771 }
17721772
17731773 /**
1774 - * If this edit will be auto-reviewed on submit
1775 - * Note: checking wpReviewEdit does not count as auto-reviewed
1776 - * @param EditPage $editPage
1777 - * @return bool
1778 - */
 1774+ * If this edit will be auto-reviewed on submit
 1775+ * Note: checking wpReviewEdit does not count as auto-reviewed
 1776+ * @param EditPage $editPage
 1777+ * @return bool
 1778+ */
17791779 protected function editWillBeAutoreviewed( EditPage $editPage ) {
17801780 $title = $this->article->getTitle(); // convenience
17811781 if ( !$this->article->isReviewable() ) {
@@ -1796,10 +1796,10 @@
17971797 }
17981798
17991799 /**
1800 - * Add a "review pending changes" checkbox to the edit form iff:
1801 - * (a) there are currently any revisions pending (bug 16713)
1802 - * (b) this is an unreviewed page (bug 23970)
1803 - */
 1800+ * Add a "review pending changes" checkbox to the edit form iff:
 1801+ * (a) there are currently any revisions pending (bug 16713)
 1802+ * (b) this is an unreviewed page (bug 23970)
 1803+ */
18041804 public function addReviewCheck( EditPage $editPage, array &$checkboxes, &$tabindex ) {
18051805 $request = $this->getRequest();
18061806 $title = $this->article->getTitle(); // convenience
@@ -1843,11 +1843,11 @@
18441844 }
18451845
18461846 /**
1847 - * (a) Add a hidden field that has the rev ID the text is based off.
1848 - * (b) If an edit was undone, add a hidden field that has the rev ID of that edit.
1849 - * Needed for autoreview and user stats (for autopromote).
1850 - * Note: baseRevId trusted for Reviewers - text checked for others.
1851 - */
 1847+ * (a) Add a hidden field that has the rev ID the text is based off.
 1848+ * (b) If an edit was undone, add a hidden field that has the rev ID of that edit.
 1849+ * Needed for autoreview and user stats (for autopromote).
 1850+ * Note: baseRevId trusted for Reviewers - text checked for others.
 1851+ */
18521852 public function addRevisionIDField( EditPage $editPage, OutputPage $out ) {
18531853 $revId = self::getBaseRevId( $editPage, $this->getRequest() );
18541854 $out->addHTML( "\n" . Html::hidden( 'baseRevId', $revId ) );
@@ -1857,10 +1857,10 @@
18581858 }
18591859
18601860 /**
1861 - * Guess the rev ID the text of this form is based off
1862 - * Note: baseRevId trusted for Reviewers - check text for others.
1863 - * @return int
1864 - */
 1861+ * Guess the rev ID the text of this form is based off
 1862+ * Note: baseRevId trusted for Reviewers - check text for others.
 1863+ * @return int
 1864+ */
18651865 protected static function getBaseRevId( EditPage $editPage, WebRequest $request ) {
18661866 if ( !isset( $editPage->fr_baseRevId ) ) {
18671867 $article = $editPage->getArticle(); // convenience
Index: trunk/extensions/FlaggedRevs/frontend/RevisionReviewFormUI.php
@@ -13,7 +13,7 @@
1414 protected $templateIDs = null;
1515 protected $imageSHA1Keys = null;
1616
17 - /**
 17+ /**
1818 * Generates a brief review form for a page
1919 * @param RequestContext $context
2020 * @param FlaggableWikiPage $article
@@ -69,7 +69,7 @@
7070 $this->imageSHA1Keys = $imageSHA1Keys;
7171 }
7272
73 - /**
 73+ /**
7474 * Generates a brief review form for a page
7575 * @return array (html string, error string or true)
7676 */
@@ -243,9 +243,9 @@
244244 }
245245
246246 /*
247 - * If the REJECT button should show then get the ID of the last good rev
248 - * @return int
249 - */
 247+ * If the REJECT button should show then get the ID of the last good rev
 248+ * @return int
 249+ */
250250 protected function rejectRefRevId() {
251251 if ( $this->refRev ) {
252252 $priorId = $this->refRev->getId();
Index: trunk/extensions/FlaggedRevs/frontend/modules/ext.flaggedRevs.review.js
@@ -43,13 +43,13 @@
4444 },
4545
4646 /*
47 - * Updates for radios/checkboxes on patch by Daniel Arnold (bug 13744).
48 - * Visually update the revision rating form on change.
49 - * - Disable submit in case of invalid input.
50 - * - Update colors when <select> changes.
51 - * - Also remove comment box clutter in case of invalid input.
52 - * NOTE: all buttons should exist (perhaps hidden though)
53 - */
 47+ * Updates for radios/checkboxes on patch by Daniel Arnold (bug 13744).
 48+ * Visually update the revision rating form on change.
 49+ * - Disable submit in case of invalid input.
 50+ * - Update colors when <select> changes.
 51+ * - Also remove comment box clutter in case of invalid input.
 52+ * NOTE: all buttons should exist (perhaps hidden though)
 53+ */
5454 'updateReviewForm': function( form ) {
5555 if ( form.prop( 'disabled' ) ) {
5656 return;
@@ -105,8 +105,8 @@
106106 },
107107
108108 /*
109 - * Update <select> color for the selected item/option
110 - */
 109+ * Update <select> color for the selected item/option
 110+ */
111111 'updateReviewFormColors': function( form ) {
112112 for ( var tag in wgFlaggedRevsParams.tags ) { // for each tag
113113 var select = form.find( "[name='wp" + tag + "']" ).eq( 0 );
@@ -123,15 +123,15 @@
124124 },
125125
126126 /*
127 - * Lock review form from submissions (using during AJAX requests)
128 - */
 127+ * Lock review form from submissions (using during AJAX requests)
 128+ */
129129 'lockReviewForm': function( form ) {
130130 form.find( 'input,textarea,select' ).prop( 'disabled', 'disabled' );
131131 },
132132
133133 /*
134 - * Unlock review form from submissions (using after AJAX requests)
135 - */
 134+ * Unlock review form from submissions (using after AJAX requests)
 135+ */
136136 'unlockReviewForm': function( form ) {
137137 var inputs = form.find( 'input' );
138138 for ( var i=0; i < inputs.length; i++ ) {
@@ -145,11 +145,11 @@
146146 },
147147
148148 /*
149 - * Submit a revision review via AJAX and update form elements.
 149+ * Submit a revision review via AJAX and update form elements.
150150 *
151 - * Note: requestArgs build-up from radios/checkboxes
152 - * based on patch by Daniel Arnold (bug 13744)
153 - */
 151+ * Note: requestArgs build-up from radios/checkboxes
 152+ * based on patch by Daniel Arnold (bug 13744)
 153+ */
154154 'submitRevisionReview': function( button, form ) {
155155 fr.lockReviewForm( form ); // disallow submissions
156156 // Build up arguments array and update submit button text...
@@ -207,8 +207,8 @@
208208 },
209209
210210 /*
211 - * Update form elements after AJAX review.
212 - */
 211+ * Update form elements after AJAX review.
 212+ */
213213 'postSubmitRevisionReview': function( form, response ) {
214214 var msg = response.substr(6); // remove <err#> or <suc#>
215215 // Read new "last change time" timestamp for conflict handling
@@ -308,8 +308,8 @@
309309 },
310310
311311 /*
312 - * Enable AJAX-based functionality to set that a user is reviewing a page/diff
313 - */
 312+ * Enable AJAX-based functionality to set that a user is reviewing a page/diff
 313+ */
314314 'enableAjaxReviewActivity': function() {
315315 // User is already reviewing in another tab...
316316 if ( $('#mw-fr-user-reviewing').val() === 1 ) {
@@ -323,8 +323,8 @@
324324 },
325325
326326 /*
327 - * Flag users as "now reviewing"
328 - */
 327+ * Flag users as "now reviewing"
 328+ */
329329 'advertiseReviewing': function( e, isInitial ) {
330330 if ( isInitial !== true ) { // don't send if just setting up form
331331 if ( !fr.setReviewingStatus( 1 ) ) {
@@ -349,8 +349,8 @@
350350 },
351351
352352 /*
353 - * Flag users as "no longer reviewing"
354 - */
 353+ * Flag users as "no longer reviewing"
 354+ */
355355 'deadvertiseReviewing': function( e, isInitial ) {
356356 if ( isInitial !== true ) { // don't send if just setting up form
357357 if ( !fr.setReviewingStatus( 0 ) ) {
@@ -377,8 +377,8 @@
378378 },
379379
380380 /*
381 - * Set reviewing status for this page/diff
382 - */
 381+ * Set reviewing status for this page/diff
 382+ */
383383 'setReviewingStatus': function( value ) {
384384 var res = false;
385385 // Get {previd,oldid} array for this page view.
Index: trunk/extensions/FlaggedRevs/frontend/FlaggedRevsLogView.php
@@ -2,9 +2,9 @@
33
44 class FlaggedRevsLogView {
55 /**
6 - * Add setting change description to log line
7 - * @return string
8 - */
 6+ * Add setting change description to log line
 7+ * @return string
 8+ */
99 public static function stabilityLogText(
1010 $type, $action, $title = null, $skin = null, $params = array()
1111 ) {
@@ -26,13 +26,13 @@
2727 }
2828
2929 /**
30 - * Add history page link to log line
 30+ * Add history page link to log line
3131 *
32 - * @param Title $title
33 - * @param string $timestamp
34 - * @param array $params
35 - * @return string
36 - */
 32+ * @param Title $title
 33+ * @param string $timestamp
 34+ * @param array $params
 35+ * @return string
 36+ */
3737 public static function stabilityLogLinks( $title, $timestamp, $params ) {
3838 global $wgUser;
3939 # Add history link showing edits right before the config change
@@ -47,12 +47,12 @@
4848 }
4949
5050 /**
51 - * Make a list of stability settings for display
 51+ * Make a list of stability settings for display
5252 *
53 - * @param array $pars assoc array
54 - * @param bool $forContent
55 - * @return string
56 - */
 53+ * @param array $pars assoc array
 54+ * @param bool $forContent
 55+ * @return string
 56+ */
5757 public static function stabilitySettings( array $pars, $forContent ) {
5858 global $wgLang, $wgContLang;
5959 $set = array();
@@ -94,8 +94,8 @@
9595 }
9696
9797 /**
98 - * Create revision, diff, and history links for log line entry
99 - */
 98+ * Create revision, diff, and history links for log line entry
 99+ */
100100 public static function reviewLogLinks( $action, $title, $params ) {
101101 global $wgUser, $wgLang;
102102 $links = '';
Index: trunk/extensions/FlaggedRevs/backend/FRDependencyUpdate.php
@@ -74,10 +74,10 @@
7575 }
7676
7777 /*
78 - * Get existing cache dependancies
79 - * @param int $flags FR_MASTER
80 - * @return array (ns => dbKey => 1)
81 - */
 78+ * Get existing cache dependancies
 79+ * @param int $flags FR_MASTER
 80+ * @return array (ns => dbKey => 1)
 81+ */
8282 protected function getExistingDeps( $flags = 0 ) {
8383 $db = ( $flags & FR_MASTER ) ?
8484 wfGetDB( DB_MASTER ) : wfGetDB( DB_SLAVE );
@@ -97,9 +97,9 @@
9898 }
9999
100100 /*
101 - * Get INSERT rows for cache dependancies in $new but not in $existing
102 - * @return array
103 - */
 101+ * Get INSERT rows for cache dependancies in $new but not in $existing
 102+ * @return array
 103+ */
104104 protected function getDepInsertions( array $existing, array $new ) {
105105 $arr = array();
106106 foreach ( $new as $ns => $dbkeys ) {
@@ -120,9 +120,9 @@
121121 }
122122
123123 /*
124 - * Get WHERE clause to delete items in $existing but not in $new
125 - * @return mixed (array/false)
126 - */
 124+ * Get WHERE clause to delete items in $existing but not in $new
 125+ * @return mixed (array/false)
 126+ */
127127 protected function getDepDeletions( array $existing, array $new ) {
128128 $del = array();
129129 foreach ( $existing as $ns => $dbkeys ) {
Index: trunk/extensions/FlaggedRevs/backend/FRUserCounters.php
@@ -4,12 +4,12 @@
55 */
66 class FRUserCounters {
77 /**
8 - * Get params for a user ID
9 - * @param int $uid
10 - * @param int $flags FR_MASTER, FR_FOR_UPDATE
11 - * @param string $dBName, optional wiki name
12 - * @return array
13 - */
 8+ * Get params for a user ID
 9+ * @param int $uid
 10+ * @param int $flags FR_MASTER, FR_FOR_UPDATE
 11+ * @param string $dBName, optional wiki name
 12+ * @return array
 13+ */
1414 public static function getUserParams( $uid, $flags = 0, $dBName = false ) {
1515 $p = array();
1616 $row = self::fetchParamsRow( $uid, $flags, $dBName );
@@ -21,10 +21,10 @@
2222 }
2323
2424 /**
25 - * Get params for a user
26 - * @param User $user
27 - * @return array|null
28 - */
 25+ * Get params for a user
 26+ * @param User $user
 27+ * @return array|null
 28+ */
2929 public static function getParams( User $user ) {
3030 if ( $user->getId() ) {
3131 if ( !isset( $user->fr_user_params ) ) { // process cache...
@@ -36,9 +36,9 @@
3737 }
3838
3939 /**
40 - * Initializes unset param fields to their starting values
41 - * @param &array $p
42 - */
 40+ * Initializes unset param fields to their starting values
 41+ * @param &array $p
 42+ */
4343 protected static function setUnitializedFields( array &$p ) {
4444 if ( !isset( $p['uniqueContentPages'] ) ) {
4545 $p['uniqueContentPages'] = array();
@@ -55,12 +55,12 @@
5656 }
5757
5858 /**
59 - * Get the params row for a user
60 - * @param int $uid
61 - * @param int $flags FR_MASTER, FR_FOR_UPDATE
62 - * @param string $dBName, optional wiki name
63 - * @return mixed (false or Row)
64 - */
 59+ * Get the params row for a user
 60+ * @param int $uid
 61+ * @param int $flags FR_MASTER, FR_FOR_UPDATE
 62+ * @param string $dBName, optional wiki name
 63+ * @return mixed (false or Row)
 64+ */
6565 protected static function fetchParamsRow( $uid, $flags = 0, $dBName = false ) {
6666 $options = array();
6767 if ( $flags & FR_MASTER || $flags & FR_FOR_UPDATE ) {
@@ -78,12 +78,12 @@
7979 }
8080
8181 /**
82 - * Save params for a user
83 - * @param int $uid
84 - * @param array $params
85 - * @param string $dBName, optional wiki name
86 - * @return bool success
87 - */
 82+ * Save params for a user
 83+ * @param int $uid
 84+ * @param array $params
 85+ * @param string $dBName, optional wiki name
 86+ * @return bool success
 87+ */
8888 public static function saveUserParams( $uid, array $params, $dBName = false ) {
8989 $dbw = wfGetDB( DB_MASTER, array(), $dBName );
9090 $dbw->replace( 'flaggedrevs_promote',
@@ -96,11 +96,11 @@
9797 }
9898
9999 /**
100 - * Increments a count for a user
101 - * @param int $uid User id
102 - * @param string $param Count name
103 - * @return string
104 - */
 100+ * Increments a count for a user
 101+ * @param int $uid User id
 102+ * @param string $param Count name
 103+ * @return string
 104+ */
105105 public static function incCount( $uid, $param ) {
106106 $p = self::getUserParams( $uid, FR_FOR_UPDATE );
107107 if ( !isset( $p[$param] ) ) {
@@ -111,11 +111,11 @@
112112 }
113113
114114 /**
115 - * Flatten params for a user for DB storage
116 - * Note: param values must be integers
117 - * @param array $params
118 - * @return string
119 - */
 115+ * Flatten params for a user for DB storage
 116+ * Note: param values must be integers
 117+ * @param array $params
 118+ * @return string
 119+ */
120120 protected static function flattenParams( array $params ) {
121121 $flatRows = array();
122122 foreach ( $params as $key => $value ) {
@@ -133,10 +133,10 @@
134134 }
135135
136136 /**
137 - * Expand params for a user from DB storage
138 - * @param string $flatPars
139 - * @return array
140 - */
 137+ * Expand params for a user from DB storage
 138+ * @param string $flatPars
 139+ * @return array
 140+ */
141141 protected static function expandParams( $flatPars ) {
142142 $p = array(); // init
143143 $flatPars = explode( "\n", trim( $flatPars ) );
@@ -157,12 +157,12 @@
158158 }
159159
160160 /**
161 - * Update users params array for a user on edit
162 - * @param &array $p user params
163 - * @param Page $article the article just edited
164 - * @param string $summary edit summary
165 - * @return bool anything changed
166 - */
 161+ * Update users params array for a user on edit
 162+ * @param &array $p user params
 163+ * @param Page $article the article just edited
 164+ * @param string $summary edit summary
 165+ * @return bool anything changed
 166+ */
167167 public static function updateUserParams( array &$p, Page $article, $summary ) {
168168 global $wgFlaggedRevsAutoconfirm, $wgFlaggedRevsAutopromote;
169169 # Update any special counters for non-null revisions
Index: trunk/extensions/FlaggedRevs/backend/FlaggedRevs.hooks.php
@@ -4,8 +4,8 @@
55 */
66 class FlaggedRevsHooks {
77 /**
8 - * Update flaggedrevs table on revision restore
9 - */
 8+ * Update flaggedrevs table on revision restore
 9+ */
1010 public static function onRevisionRestore( $title, Revision $revision, $oldPageID ) {
1111 $dbw = wfGetDB( DB_MASTER );
1212 # Some revisions may have had null rev_id values stored when deleted.
@@ -20,8 +20,8 @@
2121 }
2222
2323 /**
24 - * Update flaggedrevs page/tracking tables (revision moving)
25 - */
 24+ * Update flaggedrevs page/tracking tables (revision moving)
 25+ */
2626 public static function onArticleMergeComplete( Title $sourceTitle, Title $destTitle ) {
2727 $oldPageID = $sourceTitle->getArticleID();
2828 $newPageID = $destTitle->getArticleID();
@@ -56,9 +56,9 @@
5757 }
5858
5959 /**
60 - * (a) Update flaggedrevs page/tracking tables
61 - * (b) Autoreview pages moved into content NS
62 - */
 60+ * (a) Update flaggedrevs page/tracking tables
 61+ * (b) Autoreview pages moved into content NS
 62+ */
6363 public static function onTitleMoveComplete(
6464 Title $otitle, Title $ntitle, $user, $pageId
6565 ) {
@@ -87,10 +87,10 @@
8888 }
8989
9090 /**
91 - * (a) Update flaggedrevs page/tracking tables
92 - * (b) Pages with stable versions that use this page will be purged
93 - * Note: pages with current versions that use this page should already be purged
94 - */
 91+ * (a) Update flaggedrevs page/tracking tables
 92+ * (b) Pages with stable versions that use this page will be purged
 93+ * Note: pages with current versions that use this page should already be purged
 94+ */
9595 public static function onArticleEditUpdates( Page $article, $editInfo ) {
9696 FlaggedRevs::stableVersionUpdates( $article->getTitle(), null, null, $editInfo );
9797 FlaggedRevs::extraHTMLCacheUpdate( $article->getTitle() );
@@ -98,10 +98,10 @@
9999 }
100100
101101 /**
102 - * (a) Update flaggedrevs page/tracking tables
103 - * (b) Pages with stable versions that use this page will be purged
104 - * Note: pages with current versions that use this page should already be purged
105 - */
 102+ * (a) Update flaggedrevs page/tracking tables
 103+ * (b) Pages with stable versions that use this page will be purged
 104+ * Note: pages with current versions that use this page should already be purged
 105+ */
106106 public static function onArticleDelete( Page $article, $user, $reason, $id ) {
107107 FlaggedRevs::clearTrackingRows( $id );
108108 FlaggedRevs::extraHTMLCacheUpdate( $article->getTitle() );
@@ -109,10 +109,10 @@
110110 }
111111
112112 /**
113 - * (a) Update flaggedrevs page/tracking tables
114 - * (b) Pages with stable versions that use this page will be purged
115 - * Note: pages with current versions that use this page should already be purged
116 - */
 113+ * (a) Update flaggedrevs page/tracking tables
 114+ * (b) Pages with stable versions that use this page will be purged
 115+ * Note: pages with current versions that use this page should already be purged
 116+ */
117117 public static function onArticleUndelete( Title $title ) {
118118 FlaggedRevs::stableVersionUpdates( $title );
119119 FlaggedRevs::HTMLCacheUpdates( $title );
@@ -120,10 +120,10 @@
121121 }
122122
123123 /**
124 - * (a) Update flaggedrevs page/tracking tables
125 - * (b) Pages with stable versions that use this page will be purged
126 - * Note: pages with current versions that use this page should already be purged
127 - */
 124+ * (a) Update flaggedrevs page/tracking tables
 125+ * (b) Pages with stable versions that use this page will be purged
 126+ * Note: pages with current versions that use this page should already be purged
 127+ */
128128 public static function onFileUpload( File $file ) {
129129 FlaggedRevs::stableVersionUpdates( $file->getTitle() );
130130 FlaggedRevs::extraHTMLCacheUpdate( $file->getTitle() );
@@ -131,8 +131,8 @@
132132 }
133133
134134 /**
135 - * Update flaggedrevs page/tracking tables
136 - */
 135+ * Update flaggedrevs page/tracking tables
 136+ */
137137 public static function onRevisionDelete( Title $title ) {
138138 $changed = FlaggedRevs::stableVersionUpdates( $title );
139139 if ( $changed ) {
@@ -142,9 +142,9 @@
143143 }
144144
145145 /**
146 - * Select the desired templates based on the selected stable revision IDs
147 - * Note: $parser can be false
148 - */
 146+ * Select the desired templates based on the selected stable revision IDs
 147+ * Note: $parser can be false
 148+ */
149149 public static function parserFetchStableTemplate( $parser, Title $title, &$skip, &$id ) {
150150 if ( !( $parser instanceof Parser ) ) {
151151 return true; // nothing to do
@@ -178,8 +178,8 @@
179179 }
180180
181181 /**
182 - * Select the desired images based on the selected stable version time/SHA-1
183 - */
 182+ * Select the desired images based on the selected stable version time/SHA-1
 183+ */
184184 public static function parserFetchStableFile( $parser, Title $title, &$options, &$query ) {
185185 if ( !( $parser instanceof Parser ) ) {
186186 return true; // nothing to do
@@ -286,9 +286,9 @@
287287 }
288288
289289 /**
290 - * Detect if a ParserOutput object was added without mImageTimeKeys set.
291 - * This is needed for older, cached, ParserOutput objects.
292 - */
 290+ * Detect if a ParserOutput object was added without mImageTimeKeys set.
 291+ * This is needed for older, cached, ParserOutput objects.
 292+ */
293293 public static function outputSetVersioningFlag( OutputPage $out, ParserOutput $parserOut ) {
294294 if ( !FlaggedRevs::parserOutputIsVersioned( $parserOut ) ) {
295295 $out->fr_unversionedIncludes = true;
@@ -297,8 +297,8 @@
298298 }
299299
300300 /**
301 - * Check page move and patrol permissions for FlaggedRevs
302 - */
 301+ * Check page move and patrol permissions for FlaggedRevs
 302+ */
303303 public static function onUserCan( Title $title, $user, $action, &$result ) {
304304 if ( $result === false ) {
305305 return true; // nothing to do
@@ -345,15 +345,15 @@
346346 }
347347
348348 /**
349 - * When an edit is made by a user, review it if either:
350 - * (a) The user can 'autoreview' and the edit's base revision is a checked
351 - * (b) The edit is a self-revert to the stable version (by anyone)
352 - * (c) The user can 'autoreview' new pages and this edit is a new page
353 - * (d) The user can 'review' and the "review pending edits" checkbox was checked
 349+ * When an edit is made by a user, review it if either:
 350+ * (a) The user can 'autoreview' and the edit's base revision is a checked
 351+ * (b) The edit is a self-revert to the stable version (by anyone)
 352+ * (c) The user can 'autoreview' new pages and this edit is a new page
 353+ * (d) The user can 'review' and the "review pending edits" checkbox was checked
354354 *
355 - * Note: RC items not inserted yet, RecentChange_save hook does rc_patrolled bit...
356 - * Note: $article one of Article, ImagePage, Category page as appropriate.
357 - */
 355+ * Note: RC items not inserted yet, RecentChange_save hook does rc_patrolled bit...
 356+ * Note: $article one of Article, ImagePage, Category page as appropriate.
 357+ */
358358 public static function maybeMakeEditReviewed(
359359 Page $article, $rev, $baseRevId = false, $user = null
360360 ) {
@@ -485,8 +485,8 @@
486486 }
487487
488488 /**
489 - * Check if a user reverted himself to the stable version
490 - */
 489+ * Check if a user reverted himself to the stable version
 490+ */
491491 protected static function isSelfRevertToStable(
492492 Revision $rev, $srev, $baseRevId, $user
493493 ) {
@@ -522,11 +522,11 @@
523523 }
524524
525525 /**
526 - * When an user makes a null-edit we sometimes want to review it...
527 - * (a) Null undo or rollback
528 - * (b) Null edit with review box checked
529 - * Note: called after edit ops are finished
530 - */
 526+ * When an user makes a null-edit we sometimes want to review it...
 527+ * (a) Null undo or rollback
 528+ * (b) Null edit with review box checked
 529+ * Note: called after edit ops are finished
 530+ */
531531 public static function maybeNullEditReview(
532532 Page $article, $user, $text, $s, $m, $a, $b, $flags, $rev, &$status, $baseId
533533 ) {
@@ -594,12 +594,12 @@
595595 }
596596
597597 /**
598 - * When an edit is made to a page:
599 - * (a) If the page is reviewable, silently mark the edit patrolled if it was auto-reviewed
600 - * (b) If the page can be patrolled, auto-patrol the edit patrolled as normal
601 - * (c) If the page is new and $wgUseNPPatrol is on, auto-patrol the edit patrolled as normal
602 - * (d) If the edit is neither reviewable nor patrolleable, silently mark it patrolled
603 - */
 598+ * When an edit is made to a page:
 599+ * (a) If the page is reviewable, silently mark the edit patrolled if it was auto-reviewed
 600+ * (b) If the page can be patrolled, auto-patrol the edit patrolled as normal
 601+ * (c) If the page is new and $wgUseNPPatrol is on, auto-patrol the edit patrolled as normal
 602+ * (d) If the edit is neither reviewable nor patrolleable, silently mark it patrolled
 603+ */
604604 public static function autoMarkPatrolled( RecentChange &$rc ) {
605605 if ( empty( $rc->mAttribs['rc_this_oldid'] ) ) {
606606 return true;
@@ -698,12 +698,12 @@
699699 }
700700
701701 /**
702 - * Check if a user has enough implicitly reviewed edits (before stable version)
703 - * @param $user User
704 - * @param $editsReq int
705 - * @param $cutoff_unixtime int exclude edits after this timestamp
706 - * @return bool
707 - */
 702+ * Check if a user has enough implicitly reviewed edits (before stable version)
 703+ * @param $user User
 704+ * @param $editsReq int
 705+ * @param $cutoff_unixtime int exclude edits after this timestamp
 706+ * @return bool
 707+ */
708708 protected static function reviewedEditsCheck( $user, $editsReq, $cutoff_unixtime = 0 ) {
709709 $dbr = wfGetDB( DB_SLAVE );
710710 $encCutoff = $dbr->addQuotes( $dbr->timestamp( $cutoff_unixtime ) );
@@ -721,8 +721,8 @@
722722 }
723723
724724 /**
725 - * Checks if $user was previously blocked since $cutoff_unixtime
726 - */
 725+ * Checks if $user was previously blocked since $cutoff_unixtime
 726+ */
727727 protected static function wasPreviouslyBlocked( User $user, $cutoff_unixtime = 0 ) {
728728 $dbr = wfGetDB( DB_SLAVE );
729729 $conds = array(
@@ -771,8 +771,8 @@
772772 }
773773
774774 /**
775 - * Grant 'autoreview' rights to users with the 'bot' right
776 - */
 775+ * Grant 'autoreview' rights to users with the 'bot' right
 776+ */
777777 public static function onUserGetRights( $user, array &$rights ) {
778778 # Make sure bots always have the 'autoreview' right
779779 if ( in_array( 'bot', $rights ) && !in_array( 'autoreview', $rights ) ) {
@@ -782,9 +782,9 @@
783783 }
784784
785785 /**
786 - * Callback that autopromotes user according to the setting in
787 - * $wgFlaggedRevsAutopromote. This also handles user stats tallies.
788 - */
 786+ * Callback that autopromotes user according to the setting in
 787+ * $wgFlaggedRevsAutopromote. This also handles user stats tallies.
 788+ */
789789 public static function onArticleSaveComplete(
790790 Page $article, $user, $text, $summary, $m, $a, $b, &$f, $rev
791791 ) {
@@ -805,10 +805,10 @@
806806 }
807807
808808 /**
809 - * Check an autopromote condition that is defined by FlaggedRevs
 809+ * Check an autopromote condition that is defined by FlaggedRevs
810810 *
811 - * Note: some unobtrusive caching is used to avoid DB hits.
812 - */
 811+ * Note: some unobtrusive caching is used to avoid DB hits.
 812+ */
813813 public static function checkAutoPromoteCond( $cond, array $params, User $user, &$result ) {
814814 global $wgMemc;
815815 switch( $cond ) {
Index: trunk/extensions/FlaggedRevs/backend/FlaggedRevsLog.php
@@ -2,25 +2,25 @@
33
44 class FlaggedRevsLog {
55 /**
6 - * $action is a valid review log action
7 - * @return bool
8 - */
 6+ * $action is a valid review log action
 7+ * @return bool
 8+ */
99 public static function isReviewAction( $action ) {
1010 return preg_match( '/^(approve2?(-i|-a|-ia)?|unapprove2?)$/', $action );
1111 }
1212
1313 /**
14 - * $action is a valid stability log action
15 - * @return bool
16 - */
 14+ * $action is a valid stability log action
 15+ * @return bool
 16+ */
1717 public static function isStabilityAction( $action ) {
1818 return preg_match( '/^(config|modify|reset)$/', $action );
1919 }
2020
2121 /**
22 - * $action is a valid review log deprecate action
23 - * @return bool
24 - */
 22+ * $action is a valid review log deprecate action
 23+ * @return bool
 24+ */
2525 public static function isReviewDeapproval( $action ) {
2626 return ( $action == 'unapprove' || $action == 'unapprove2' );
2727 }
Index: trunk/extensions/FlaggedRevs/backend/FlaggedRevs.class.php
@@ -408,11 +408,11 @@
409409 # ################ Permission functions #################
410410
411411 /*
412 - * Sanity check a (tag,value) pair
413 - * @param string $tag
414 - * @param int $value
415 - * @return bool
416 - */
 412+ * Sanity check a (tag,value) pair
 413+ * @param string $tag
 414+ * @param int $value
 415+ * @return bool
 416+ */
417417 public static function tagIsValid( $tag, $value ) {
418418 $levels = self::getTagLevels( $tag );
419419 $highest = count( $levels ) - 1;
@@ -496,11 +496,11 @@
497497 }
498498
499499 /**
500 - * Check if a user can set the autoreview restiction level to $right
501 - * @param User $user
502 - * @param string $right the level
503 - * @return bool
504 - */
 500+ * Check if a user can set the autoreview restiction level to $right
 501+ * @param User $user
 502+ * @param string $right the level
 503+ * @return bool
 504+ */
505505 public static function userCanSetAutoreviewLevel( $user, $right ) {
506506 if ( $right == '' ) {
507507 return true; // no restrictions (none)
@@ -601,13 +601,13 @@
602602 # ################ Tracking/cache update update functions #################
603603
604604 /**
605 - * Update the page tables with a new stable version.
606 - * @param Title $title
607 - * @param FlaggedRevision|null $sv, the new stable version (optional)
608 - * @param FlaggedRevision|null $oldSv, the old stable version (optional)
609 - * @param Object editInfo Article edit info about the current revision (optional)
610 - * @return bool stable version text/file changed and FR_INCLUDES_STABLE
611 - */
 605+ * Update the page tables with a new stable version.
 606+ * @param Title $title
 607+ * @param FlaggedRevision|null $sv, the new stable version (optional)
 608+ * @param FlaggedRevision|null $oldSv, the old stable version (optional)
 609+ * @param Object editInfo Article edit info about the current revision (optional)
 610+ * @return bool stable version text/file changed and FR_INCLUDES_STABLE
 611+ */
612612 public static function stableVersionUpdates(
613613 Title $title, $sv = null, $oldSv = null, $editInfo = null
614614 ) {
@@ -652,9 +652,9 @@
653653 }
654654
655655 /**
656 - * Clear FlaggedRevs tracking tables for this page
657 - * @param int|array $pageId (int or array)
658 - */
 656+ * Clear FlaggedRevs tracking tables for this page
 657+ * @param int|array $pageId (int or array)
 658+ */
659659 public static function clearTrackingRows( $pageId ) {
660660 $dbw = wfGetDB( DB_MASTER );
661661 $dbw->delete( 'flaggedpages', array( 'fp_page_id' => $pageId ), __METHOD__ );
@@ -663,10 +663,10 @@
664664 }
665665
666666 /**
667 - * @param Page $article
668 - * @param parserOutput $parserOut
669 - * Updates the stable-only cache dependency table
670 - */
 667+ * @param Page $article
 668+ * @param parserOutput $parserOut
 669+ * Updates the stable-only cache dependency table
 670+ */
671671 public static function updateStableOnlyDeps( Page $article, ParserOutput $stableOut ) {
672672 wfProfileIn( __METHOD__ );
673673 if ( !wfReadOnly() ) {
@@ -677,29 +677,29 @@
678678 }
679679
680680 /**
681 - * Clear tracking table of stable-only links for this page
682 - * @param int|array $pageId (int or array)
683 - */
 681+ * Clear tracking table of stable-only links for this page
 682+ * @param int|array $pageId (int or array)
 683+ */
684684 public static function clearStableOnlyDeps( $pageId ) {
685685 $dbw = wfGetDB( DB_MASTER );
686686 $dbw->delete( 'flaggedrevs_tracking', array( 'ftr_from' => $pageId ), __METHOD__ );
687687 }
688688
689689 /**
690 - * @param Title $title
691 - * Updates squid cache for a title. Defers till after main commit().
692 - */
 690+ * @param Title $title
 691+ * Updates squid cache for a title. Defers till after main commit().
 692+ */
693693 public static function purgeSquid( Title $title ) {
694694 global $wgDeferredUpdateList;
695695 $wgDeferredUpdateList[] = new FRSquidUpdate( $title );
696696 }
697697
698698 /**
699 - * Do cache updates for when the stable version of a page changed.
700 - * Invalidates/purges pages that include the given page.
701 - * @param Title $title
702 - * @param bool $recursive
703 - */
 699+ * Do cache updates for when the stable version of a page changed.
 700+ * Invalidates/purges pages that include the given page.
 701+ * @param Title $title
 702+ * @param bool $recursive
 703+ */
704704 public static function HTMLCacheUpdates( Title $title ) {
705705 global $wgDeferredUpdateList;
706706 # Invalidate caches of articles which include this page...
@@ -711,9 +711,9 @@
712712 }
713713
714714 /**
715 - * Invalidates/purges pages where only stable version includes this page.
716 - * @param Title $title
717 - */
 715+ * Invalidates/purges pages where only stable version includes this page.
 716+ * @param Title $title
 717+ */
718718 public static function extraHTMLCacheUpdate( Title $title ) {
719719 global $wgDeferredUpdateList;
720720 $wgDeferredUpdateList[] = new FRExtraCacheUpdate( $title );
@@ -756,12 +756,12 @@
757757 }
758758
759759 /**
760 - * Return memc value if not expired
761 - * @param object|false $data makeMemcObj() tuple
762 - * @param Page $article
763 - * @param $allowStale Use 'allowStale' to skip page_touched check
764 - * @return mixed
765 - */
 760+ * Return memc value if not expired
 761+ * @param object|false $data makeMemcObj() tuple
 762+ * @param Page $article
 763+ * @param $allowStale Use 'allowStale' to skip page_touched check
 764+ * @return mixed
 765+ */
766766 public static function getMemcValue( $data, Page $article, $allowStale = '' ) {
767767 if ( is_object( $data ) ) {
768768 if ( $allowStale === 'allowStale' || $data->time >= $article->getTouched() ) {
@@ -772,27 +772,27 @@
773773 }
774774
775775 /**
776 - * @param array $flags
777 - * @return bool, is this revision at basic review condition?
778 - */
 776+ * @param array $flags
 777+ * @return bool, is this revision at basic review condition?
 778+ */
779779 public static function isChecked( array $flags ) {
780780 self::load();
781781 return self::tagsAtLevel( $flags, self::$minSL );
782782 }
783783
784784 /**
785 - * @param array $flags
786 - * @return bool, is this revision at quality review condition?
787 - */
 785+ * @param array $flags
 786+ * @return bool, is this revision at quality review condition?
 787+ */
788788 public static function isQuality( array $flags ) {
789789 self::load();
790790 return self::tagsAtLevel( $flags, self::$minQL );
791791 }
792792
793793 /**
794 - * @param array $flags
795 - * @return bool, is this revision at pristine review condition?
796 - */
 794+ * @param array $flags
 795+ * @return bool, is this revision at pristine review condition?
 796+ */
797797 public static function isPristine( array $flags ) {
798798 self::load();
799799 return self::tagsAtLevel( $flags, self::$minPL );
@@ -813,11 +813,11 @@
814814 }
815815
816816 /**
817 - * Get the quality tier of review flags
818 - * @param array $flags
819 - * @param int $default Return value if one of the tags has value < 0
820 - * @return int flagging tier (FR_PRISTINE,FR_QUALITY,FR_CHECKED,-1)
821 - */
 817+ * Get the quality tier of review flags
 818+ * @param array $flags
 819+ * @param int $default Return value if one of the tags has value < 0
 820+ * @return int flagging tier (FR_PRISTINE,FR_QUALITY,FR_CHECKED,-1)
 821+ */
822822 public static function getQualityTier( array $flags, $default = -1 ) {
823823 if ( self::isPristine( $flags ) ) {
824824 return FR_PRISTINE; // 2
@@ -873,20 +873,20 @@
874874 }
875875
876876 /**
877 - * Get the list of reviewable namespaces
878 - * @return array
879 - */
 877+ * Get the list of reviewable namespaces
 878+ * @return array
 879+ */
880880 public static function getReviewNamespaces() {
881881 self::load(); // validates namespaces
882882 return self::$reviewNamespaces;
883883 }
884884
885885 /**
886 - * Is this page in reviewable namespace?
887 - * Note: this checks $wgFlaggedRevsWhitelist
888 - * @param Title, $title
889 - * @return bool
890 - */
 886+ * Is this page in reviewable namespace?
 887+ * Note: this checks $wgFlaggedRevsWhitelist
 888+ * @param Title, $title
 889+ * @return bool
 890+ */
891891 public static function inReviewNamespace( Title $title ) {
892892 global $wgFlaggedRevsWhitelist;
893893 if ( in_array( $title->getPrefixedDBKey(), $wgFlaggedRevsWhitelist ) ) {
@@ -900,19 +900,19 @@
901901 # ################ Auto-review function #################
902902
903903 /**
904 - * Automatically review an revision and add a log entry in the review log.
 904+ * Automatically review an revision and add a log entry in the review log.
905905 *
906 - * This is called during edit operations after the new revision is added
907 - * and the page tables updated, but before LinksUpdate is called.
 906+ * This is called during edit operations after the new revision is added
 907+ * and the page tables updated, but before LinksUpdate is called.
908908 *
909 - * $auto is here for revisions checked off to be reviewed. Auto-review
910 - * triggers on edit, but we don't want those to count as just automatic.
911 - * This also makes it so the user's name shows up in the page history.
 909+ * $auto is here for revisions checked off to be reviewed. Auto-review
 910+ * triggers on edit, but we don't want those to count as just automatic.
 911+ * This also makes it so the user's name shows up in the page history.
912912 *
913 - * If $flags is given, then they will be the review tags. If not, the one
914 - * from the stable version will be used or minimal tags if that's not possible.
915 - * If no appropriate tags can be found, then the review will abort.
916 - */
 913+ * If $flags is given, then they will be the review tags. If not, the one
 914+ * from the stable version will be used or minimal tags if that's not possible.
 915+ * If no appropriate tags can be found, then the review will abort.
 916+ */
917917 public static function autoReviewEdit(
918918 Page $article, $user, Revision $rev, array $flags = null, $auto = true
919919 ) {
Index: trunk/extensions/FlaggedRevs/backend/FRUserActivity.php
@@ -43,10 +43,10 @@
4444 }
4545
4646 /*
47 - * Get who is currently reviewing a page
48 - * @param int $pageId
49 - * @return array (username or null, MW timestamp or null)
50 - */
 47+ * Get who is currently reviewing a page
 48+ * @param int $pageId
 49+ * @return array (username or null, MW timestamp or null)
 50+ */
5151 public static function getUserReviewingPage( $pageId ) {
5252 global $wgMemc;
5353 $key = wfMemcKey( 'flaggedrevs', 'userReviewingPage', $pageId );
@@ -57,46 +57,46 @@
5858 }
5959
6060 /*
61 - * Check if someone is currently reviewing a page
62 - * @param int $pageId
63 - * @return bool
64 - */
 61+ * Check if someone is currently reviewing a page
 62+ * @param int $pageId
 63+ * @return bool
 64+ */
6565 public static function pageIsUnderReview( $pageId ) {
6666 $m = self::getUserReviewingPage( $pageId );
6767 return ( $m[0] !== null );
6868 }
6969
7070 /*
71 - * Set the flag for who is reviewing a page if not already set by someone.
72 - * If already set, then increment the instance counter (multiple windows)
73 - * and add on time to the expiry.
 71+ * Set the flag for who is reviewing a page if not already set by someone.
 72+ * If already set, then increment the instance counter (multiple windows)
 73+ * and add on time to the expiry.
7474 *
75 - * @param User $user
76 - * @param int $pageId
77 - * @return bool flag set
78 - */
 75+ * @param User $user
 76+ * @param int $pageId
 77+ * @return bool flag set
 78+ */
7979 public static function setUserReviewingPage( User $user, $pageId ) {
8080 $key = wfMemcKey( 'flaggedrevs', 'userReviewingPage', $pageId );
8181 return self::incUserReviewingItem( $key, $user, self::PAGE_REVIEW_SEC );
8282 }
8383
8484 /*
85 - * Clear an instance of a user reviewing a page by decrementing the counter.
86 - * If it reaches 0 instances, then clear the flag for who is reviewing the page.
87 - * @param User $user
88 - * @param int $pageId
89 - * @return bool flag unset
90 - */
 85+ * Clear an instance of a user reviewing a page by decrementing the counter.
 86+ * If it reaches 0 instances, then clear the flag for who is reviewing the page.
 87+ * @param User $user
 88+ * @param int $pageId
 89+ * @return bool flag unset
 90+ */
9191 public static function clearUserReviewingPage( User $user, $pageId ) {
9292 $key = wfMemcKey( 'flaggedrevs', 'userReviewingPage', $pageId );
9393 return self::decUserReviewingItem( $key, $user, self::PAGE_REVIEW_SEC );
9494 }
9595
9696 /*
97 - * Totally clear the flag for who is reviewing a page.
98 - * @param int $pageId
99 - * @return void
100 - */
 97+ * Totally clear the flag for who is reviewing a page.
 98+ * @param int $pageId
 99+ * @return void
 100+ */
101101 public static function clearAllReviewingPage( $pageId ) {
102102 global $wgMemc;
103103 $key = wfMemcKey( 'flaggedrevs', 'userReviewingPage', $pageId );
@@ -104,11 +104,11 @@
105105 }
106106
107107 /*
108 - * Get who is currently reviewing a diff
109 - * @param int $oldId
110 - * @param int $newId
111 - * @return array (username or null, MW timestamp or null)
112 - */
 108+ * Get who is currently reviewing a diff
 109+ * @param int $oldId
 110+ * @param int $newId
 111+ * @return array (username or null, MW timestamp or null)
 112+ */
113113 public static function getUserReviewingDiff( $oldId, $newId ) {
114114 global $wgMemc;
115115 $key = wfMemcKey( 'flaggedrevs', 'userReviewingDiff', $oldId, $newId );
@@ -119,48 +119,48 @@
120120 }
121121
122122 /*
123 - * Check if someone is currently reviewing a diff
124 - * @param int $oldId
125 - * @param int $newId
126 - * @return bool
127 - */
 123+ * Check if someone is currently reviewing a diff
 124+ * @param int $oldId
 125+ * @param int $newId
 126+ * @return bool
 127+ */
128128 public static function diffIsUnderReview( $oldId, $newId ) {
129129 $m = self::getUserReviewingDiff( $oldId, $newId );
130130 return ( $m[0] !== null );
131131 }
132132
133133 /*
134 - * Set the flag for who is reviewing a diff if not already set by someone.
135 - * If already set, then increment the instance counter (multiple windows)
136 - * and add on time to the expiry.
137 - * @param User $user
138 - * @param int $pageId
139 - * @return bool flag set
140 - */
 134+ * Set the flag for who is reviewing a diff if not already set by someone.
 135+ * If already set, then increment the instance counter (multiple windows)
 136+ * and add on time to the expiry.
 137+ * @param User $user
 138+ * @param int $pageId
 139+ * @return bool flag set
 140+ */
141141 public static function setUserReviewingDiff( User $user, $oldId, $newId ) {
142142 $key = wfMemcKey( 'flaggedrevs', 'userReviewingDiff', $oldId, $newId );
143143 return self::incUserReviewingItem( $key, $user, self::CHANGE_REVIEW_SEC );
144144 }
145145
146146 /*
147 - * Clear an instance of a user reviewing a diff by decrementing the counter.
148 - * If it reaches 0 instances, then clear the flag for who is reviewing the diff.
149 - * @param User $user
150 - * @param int $oldId
151 - * @param int $newId
152 - * @return bool flag unset
153 - */
 147+ * Clear an instance of a user reviewing a diff by decrementing the counter.
 148+ * If it reaches 0 instances, then clear the flag for who is reviewing the diff.
 149+ * @param User $user
 150+ * @param int $oldId
 151+ * @param int $newId
 152+ * @return bool flag unset
 153+ */
154154 public static function clearUserReviewingDiff( User $user, $oldId, $newId ) {
155155 $key = wfMemcKey( 'flaggedrevs', 'userReviewingDiff', $oldId, $newId );
156156 return self::decUserReviewingItem( $key, $user, self::CHANGE_REVIEW_SEC );
157157 }
158158
159159 /*
160 - * Totally clear the flag for who is reviewing a diff.
161 - * @param int $oldId
162 - * @param int $newId
163 - * @return void
164 - */
 160+ * Totally clear the flag for who is reviewing a diff.
 161+ * @param int $oldId
 162+ * @param int $newId
 163+ * @return void
 164+ */
165165 public static function clearAllReviewingDiff( $oldId, $newId ) {
166166 global $wgMemc;
167167 $key = wfMemcKey( 'flaggedrevs', 'userReviewingDiff', $oldId, $newId );
Index: trunk/extensions/FlaggedRevs/backend/FlaggableWikiPage.php
@@ -54,7 +54,7 @@
5555 return $this->file;
5656 }
5757
58 - /**
 58+ /**
5959 * Is the stable version shown by default for this page?
6060 * @return bool
6161 */
@@ -142,10 +142,10 @@
143143 }
144144
145145 /**
146 - * Checks if the stable version is synced with the current revision
147 - * Note: slower than getPendingRevCount()
148 - * @return bool
149 - */
 146+ * Checks if the stable version is synced with the current revision
 147+ * Note: slower than getPendingRevCount()
 148+ * @return bool
 149+ */
150150 public function stableVersionIsSynced() {
151151 global $wgMemc, $wgParserCacheExpireTime;
152152 $srev = $this->getStableRev();
@@ -220,7 +220,7 @@
221221 FlaggedRevs::isStableShownByDefault() == $this->isStableShownByDefault();
222222 }
223223
224 - /**
 224+ /**
225225 * Is this article reviewable?
226226 * @return bool
227227 */
@@ -281,9 +281,9 @@
282282 }
283283
284284 /*
285 - * Get the fp_reviewed value for this page
286 - * @return bool
287 - */
 285+ * Get the fp_reviewed value for this page
 286+ * @return bool
 287+ */
288288 public function syncedInTracking() {
289289 if ( !$this->mDataLoaded ) {
290290 $this->loadPageData();
@@ -317,9 +317,9 @@
318318 }
319319
320320 /**
321 - * Updates the fp_reviewed field for this article
322 - * @param bool $synced
323 - */
 321+ * Updates the fp_reviewed field for this article
 322+ * @param bool $synced
 323+ */
324324 public function updateSyncStatus( $synced ) {
325325 wfProfileIn( __METHOD__ );
326326 if ( !wfReadOnly() ) {
@@ -393,11 +393,11 @@
394394 }
395395
396396 /**
397 - * Updates the flagging tracking tables for this page
398 - * @param FlaggedRevision $srev The new stable version
399 - * @param int|null $latest The latest rev ID (optional)
400 - * @return bool Updates were done
401 - */
 397+ * Updates the flagging tracking tables for this page
 398+ * @param FlaggedRevision $srev The new stable version
 399+ * @param int|null $latest The latest rev ID (optional)
 400+ * @return bool Updates were done
 401+ */
402402 public function updateStableVersion( FlaggedRevision $srev, $latest = null ) {
403403 $rev = $srev->getRevision();
404404 if ( !$this->exists() || !$rev ) {
@@ -464,9 +464,9 @@
465465 }
466466
467467 /**
468 - * Updates the flagging tracking tables for this page
469 - * @return void
470 - */
 468+ * Updates the flagging tracking tables for this page
 469+ * @return void
 470+ */
471471 public function clearStableVersion() {
472472 if ( !$this->exists() ) {
473473 return; // nothing to do
@@ -479,11 +479,11 @@
480480 }
481481
482482 /**
483 - * Updates the flaggedpage_pending table
484 - * @param int $pageId Page ID
485 - * @abstract int $latest Latest revision
486 - * @return void
487 - */
 483+ * Updates the flaggedpage_pending table
 484+ * @param int $pageId Page ID
 485+ * @abstract int $latest Latest revision
 486+ * @return void
 487+ */
488488 protected static function updatePendingList( $pageId, $latest ) {
489489 $data = array();
490490 # Get the highest tier used on this wiki
Index: trunk/extensions/FlaggedRevs/backend/FlaggedRevision.php
@@ -314,10 +314,10 @@
315315 }
316316
317317 /*
318 - * Insert a FlaggedRevision object into the database
 318+ * Insert a FlaggedRevision object into the database
319319 *
320 - * @return bool success
321 - */
 320+ * @return bool success
 321+ */
322322 public function insert() {
323323 $dbw = wfGetDB( DB_MASTER );
324324 # Set any flagged revision flags
@@ -379,10 +379,10 @@
380380 }
381381
382382 /*
383 - * Remove a FlaggedRevision object from the database
 383+ * Remove a FlaggedRevision object from the database
384384 *
385 - * @return bool success
386 - */
 385+ * @return bool success
 386+ */
387387 public function delete() {
388388 $dbw = wfGetDB( DB_MASTER );
389389 # Delete from flaggedrevs table
@@ -934,7 +934,7 @@
935935 * Get flags for a revision
936936 * @param string $tags
937937 * @return array
938 - */
 938+ */
939939 public static function expandRevisionTags( $tags ) {
940940 $flags = array();
941941 foreach ( FlaggedRevs::getTags() as $tag ) {
@@ -963,7 +963,7 @@
964964 * Get flags for a revision
965965 * @param array $tags
966966 * @return string
967 - */
 967+ */
968968 public static function flattenRevisionTags( array $tags ) {
969969 $flags = '';
970970 foreach ( $tags as $tag => $value ) {
Index: trunk/extensions/FlaggedRevs/backend/FlaggedRevsStats.php
@@ -60,11 +60,11 @@
6161 }
6262
6363 /*
64 - * Run a stats update and update the DB
65 - * Note: this can easily be too expensive to run live
 64+ * Run a stats update and update the DB
 65+ * Note: this can easily be too expensive to run live
6666 *
67 - * @return void
68 - */
 67+ * @return void
 68+ */
6969 public function updateCache() {
7070 global $wgFlaggedRevsStatsAge;
7171 $rNamespaces = FlaggedRevs::getReviewNamespaces();
Index: trunk/extensions/FlaggedRevs/business/FRGenericSubmitForm.php
@@ -23,31 +23,31 @@
2424 }
2525
2626 /**
27 - * Initialize any parameters on construction
28 - * @return void
29 - */
 27+ * Initialize any parameters on construction
 28+ * @return void
 29+ */
3030 protected function initialize() {}
3131
3232 /**
33 - * Get the submitting user
34 - * @return User
35 - */
 33+ * Get the submitting user
 34+ * @return User
 35+ */
3636 final public function getUser() {
3737 return $this->user;
3838 }
3939
4040 /**
41 - * Get the internal form state
42 - * @return int
43 - */
 41+ * Get the internal form state
 42+ * @return int
 43+ */
4444 final protected function getState() {
4545 return $this->state;
4646 }
4747
4848 /**
49 - * Signal that inputs are all given (via accessors)
50 - * @return mixed (true on success, error string on target failure)
51 - */
 49+ * Signal that inputs are all given (via accessors)
 50+ * @return mixed (true on success, error string on target failure)
 51+ */
5252 final public function ready() {
5353 if ( $this->state != self::FORM_UNREADY ) {
5454 throw new MWException( __CLASS__ . " ready() already called.\n");
@@ -61,20 +61,20 @@
6262 }
6363
6464 /**
65 - * Load any objects after ready() called
66 - * NOTE: do not do any DB hits here, just build objects
67 - * @return mixed (true on success, error string on failure)
68 - */
 65+ * Load any objects after ready() called
 66+ * NOTE: do not do any DB hits here, just build objects
 67+ * @return mixed (true on success, error string on failure)
 68+ */
6969 protected function doBuildOnReady() {
7070 return true;
7171 }
7272
7373 /**
74 - * Set a member field to a value if the fields are unlocked
75 - * @param mixed &$field Field of this form
76 - * @param mixed $value Value to set the field to
77 - * @return void
78 - */
 74+ * Set a member field to a value if the fields are unlocked
 75+ * @param mixed &$field Field of this form
 76+ * @param mixed $value Value to set the field to
 77+ * @return void
 78+ */
7979 final protected function trySet( &$field, $value ) {
8080 if ( $this->state != self::FORM_UNREADY ) {
8181 throw new MWException( __CLASS__ . " fields cannot be set anymore.\n");
@@ -84,28 +84,28 @@
8585 }
8686
8787 /*
88 - * Check that a target is given (e.g. from GET/POST request)
89 - * NOTE: do not do any DB hits here, just check if there is a target
90 - * @return mixed (true on success, error string on failure)
91 - */
 88+ * Check that a target is given (e.g. from GET/POST request)
 89+ * NOTE: do not do any DB hits here, just check if there is a target
 90+ * @return mixed (true on success, error string on failure)
 91+ */
9292 protected function doCheckTargetGiven() {
9393 return true;
9494 }
9595
9696 /*
97 - * Check that the target is valid (e.g. from GET/POST request)
98 - * @param int $flags FOR_SUBMISSION (set on submit)
99 - * @return mixed (true on success, error string on failure)
100 - */
 97+ * Check that the target is valid (e.g. from GET/POST request)
 98+ * @param int $flags FOR_SUBMISSION (set on submit)
 99+ * @return mixed (true on success, error string on failure)
 100+ */
101101 protected function doCheckTarget( $flags = 0 ) {
102102 return true;
103103 }
104104
105105 /*
106 - * Check that a target is and it is valid (e.g. from GET/POST request)
107 - * NOTE: do not do any DB hits here, just check if there is a target
108 - * @return mixed (true on success, error string on failure)
109 - */
 106+ * Check that a target is and it is valid (e.g. from GET/POST request)
 107+ * NOTE: do not do any DB hits here, just check if there is a target
 108+ * @return mixed (true on success, error string on failure)
 109+ */
110110 final public function checkTarget() {
111111 if ( $this->state != self::FORM_READY ) {
112112 throw new MWException( __CLASS__ . " input fields not set yet.\n");
@@ -118,9 +118,9 @@
119119 }
120120
121121 /*
122 - * Validate and clean up target/parameters (e.g. from POST request)
123 - * @return mixed (true on success, error string on failure)
124 - */
 122+ * Validate and clean up target/parameters (e.g. from POST request)
 123+ * @return mixed (true on success, error string on failure)
 124+ */
125125 final protected function checkParameters() {
126126 $status = $this->checkTarget( self::FOR_SUBMISSION );
127127 if ( $status !== true ) {
@@ -130,18 +130,18 @@
131131 }
132132
133133 /*
134 - * Verify and clean up parameters (e.g. from POST request)
135 - * @return mixed (true on success, error string on failure)
136 - */
 134+ * Verify and clean up parameters (e.g. from POST request)
 135+ * @return mixed (true on success, error string on failure)
 136+ */
137137 protected function doCheckParameters() {
138138 return true;
139139 }
140140
141141 /*
142 - * Preload existing params for the target from the DB (e.g. for GET request)
143 - * NOTE: do not call this and then submit()
144 - * @return mixed (true on success, error string on failure)
145 - */
 142+ * Preload existing params for the target from the DB (e.g. for GET request)
 143+ * NOTE: do not call this and then submit()
 144+ * @return mixed (true on success, error string on failure)
 145+ */
146146 final public function preload() {
147147 if ( $this->state != self::FORM_READY ) {
148148 throw new MWException( __CLASS__ . " input fields not set yet.\n");
@@ -159,17 +159,17 @@
160160 }
161161
162162 /*
163 - * Preload existing params for the target from the DB (e.g. for GET request)
164 - * @return mixed (true on success, error string on failure)
165 - */
 163+ * Preload existing params for the target from the DB (e.g. for GET request)
 164+ * @return mixed (true on success, error string on failure)
 165+ */
166166 protected function doPreloadParameters() {
167167 return true;
168168 }
169169
170170 /**
171 - * Submit the form parameters for the page config to the DB
172 - * @return mixed (true on success, error string on failure)
173 - */
 171+ * Submit the form parameters for the page config to the DB
 172+ * @return mixed (true on success, error string on failure)
 173+ */
174174 final public function submit() {
175175 if ( $this->state != self::FORM_READY ) {
176176 throw new MWException( __CLASS__ . " input fields preloaded or not set yet.\n");
@@ -187,9 +187,9 @@
188188 }
189189
190190 /**
191 - * Submit the form parameters for the page config to the DB
192 - * @return mixed (true on success, error string on failure)
193 - */
 191+ * Submit the form parameters for the page config to the DB
 192+ * @return mixed (true on success, error string on failure)
 193+ */
194194 protected function doSubmit() {
195195 return true;
196196 }
Index: trunk/extensions/FlaggedRevs/business/RevisionReviewForm.php
@@ -125,9 +125,9 @@
126126 }
127127
128128 /**
129 - * Check that a target is given (e.g. from GET/POST request)
130 - * @return mixed (true on success, error string on failure)
131 - */
 129+ * Check that a target is given (e.g. from GET/POST request)
 130+ * @return mixed (true on success, error string on failure)
 131+ */
132132 public function doCheckTargetGiven() {
133133 if ( is_null( $this->page ) ) {
134134 return 'review_page_invalid';
@@ -136,19 +136,19 @@
137137 }
138138
139139 /**
140 - * Load any objects after ready() called
141 - * @return mixed (true on success, error string on failure)
142 - */
 140+ * Load any objects after ready() called
 141+ * @return mixed (true on success, error string on failure)
 142+ */
143143 protected function doBuildOnReady() {
144144 $this->article = FlaggableWikiPage::getTitleInstance( $this->page );
145145 return true;
146146 }
147147
148148 /**
149 - * Check that the target is valid (e.g. from GET/POST request)
150 - * @param int $flags FOR_SUBMISSION (set on submit)
151 - * @return mixed (true on success, error string on failure)
152 - */
 149+ * Check that the target is valid (e.g. from GET/POST request)
 150+ * @param int $flags FOR_SUBMISSION (set on submit)
 151+ * @return mixed (true on success, error string on failure)
 152+ */
153153 protected function doCheckTarget( $flags = 0 ) {
154154 $flgs = ( $flags & self::FOR_SUBMISSION ) ? Title::GAID_FOR_UPDATE : 0;
155155 if ( !$this->page->getArticleId( $flgs ) ) {
@@ -162,9 +162,9 @@
163163 }
164164
165165 /**
166 - * Validate and clean up parameters (e.g. from POST request).
167 - * @return mixed (true on success, error string on failure)
168 - */
 166+ * Validate and clean up parameters (e.g. from POST request).
 167+ * @return mixed (true on success, error string on failure)
 168+ */
169169 protected function doCheckParameters() {
170170 $action = $this->getAction();
171171 if ( $action === null ) {
@@ -234,9 +234,9 @@
235235 }
236236
237237 /**
238 - * Get the action this submission is requesting
239 - * @return string (approve,unapprove,reject)
240 - */
 238+ * Get the action this submission is requesting
 239+ * @return string (approve,unapprove,reject)
 240+ */
241241 public function getAction() {
242242 if ( !$this->reject && !$this->unapprove && $this->approve ) {
243243 return 'approve';
@@ -249,10 +249,10 @@
250250 }
251251
252252 /**
253 - * Submit the form parameters for the page config to the DB.
 253+ * Submit the form parameters for the page config to the DB.
254254 *
255 - * @return mixed (true on success, error string on failure)
256 - */
 255+ * @return mixed (true on success, error string on failure)
 256+ */
257257 public function doSubmit() {
258258 # Double-check permissions
259259 if ( !$this->isAllowed() ) {
@@ -464,13 +464,13 @@
465465 }
466466
467467 /**
468 - * Get a validation key from versioning metadata
469 - * @param string $tmpP
470 - * @param string $imgP
471 - * @param string $imgV
472 - * @param integer $rid rev ID
473 - * @return string
474 - */
 468+ * Get a validation key from versioning metadata
 469+ * @param string $tmpP
 470+ * @param string $imgP
 471+ * @param string $imgV
 472+ * @param integer $rid rev ID
 473+ * @return string
 474+ */
475475 public static function validationKey( $tmpP, $imgP, $imgV, $rid ) {
476476 global $wgSecretKey, $wgProxyKey;
477477 $key = $wgSecretKey ? $wgSecretKey : $wgProxyKey; // fall back to $wgProxyKey
@@ -479,16 +479,16 @@
480480 }
481481
482482 /**
483 - * Update rc_patrolled fields in recent changes after (un)accepting a rev.
484 - * This maintains the patrolled <=> reviewed relationship for reviewable namespaces.
 483+ * Update rc_patrolled fields in recent changes after (un)accepting a rev.
 484+ * This maintains the patrolled <=> reviewed relationship for reviewable namespaces.
485485 *
486 - * RecentChange should only be passed in when an RC item is saved.
 486+ * RecentChange should only be passed in when an RC item is saved.
487487 *
488 - * @param $rev Revision|RecentChange
489 - * @param $patrol string "patrol" or "unpatrol"
490 - * @param $srev FlaggedRevsion|null The new stable version
491 - * @return void
492 - */
 488+ * @param $rev Revision|RecentChange
 489+ * @param $patrol string "patrol" or "unpatrol"
 490+ * @param $srev FlaggedRevsion|null The new stable version
 491+ * @return void
 492+ */
493493 public static function updateRecentChanges( $rev, $patrol, $srev ) {
494494 global $wgUseRCPatrol;
495495
Index: trunk/extensions/FlaggedRevs/business/PageStabilityForm.php
@@ -73,10 +73,10 @@
7474 }
7575
7676 /*
77 - * Get the final expiry, all inputs considered
78 - * Note: does not check if the expiration is less than wfTimestampNow()
79 - * @return 14-char timestamp or "infinity", or false if the input was invalid
80 - */
 77+ * Get the final expiry, all inputs considered
 78+ * Note: does not check if the expiration is less than wfTimestampNow()
 79+ * @return 14-char timestamp or "infinity", or false if the input was invalid
 80+ */
8181 public function getExpiry() {
8282 $oldConfig = $this->getOldConfig();
8383 if ( $this->expirySelection == 'existing' ) {
@@ -102,9 +102,9 @@
103103 }
104104
105105 /*
106 - * Get the final reason, all inputs considered
107 - * @return string
108 - */
 106+ * Get the final reason, all inputs considered
 107+ * @return string
 108+ */
109109 public function getReason() {
110110 # Custom reason replaces dropdown
111111 if ( $this->reasonSelection != 'other' ) {
@@ -120,9 +120,9 @@
121121 }
122122
123123 /*
124 - * Check that a target is given (e.g. from GET/POST request)
125 - * @return mixed (true on success, error string on failure)
126 - */
 124+ * Check that a target is given (e.g. from GET/POST request)
 125+ * @return mixed (true on success, error string on failure)
 126+ */
127127 protected function doCheckTargetGiven() {
128128 if ( is_null( $this->page ) ) {
129129 return 'stabilize_page_invalid';
@@ -131,10 +131,10 @@
132132 }
133133
134134 /*
135 - * Check that the target page is valid
136 - * @param int $flags FOR_SUBMISSION (set on submit)
137 - * @return mixed (true on success, error string on failure)
138 - */
 135+ * Check that the target page is valid
 136+ * @param int $flags FOR_SUBMISSION (set on submit)
 137+ * @return mixed (true on success, error string on failure)
 138+ */
139139 protected function doCheckTarget( $flags = 0 ) {
140140 $flgs = ( $flags & self::FOR_SUBMISSION ) ? Title::GAID_FOR_UPDATE : 0;
141141 if ( !$this->page->getArticleId( $flgs ) ) {
@@ -146,9 +146,9 @@
147147 }
148148
149149 /*
150 - * Verify and clean up parameters (e.g. from POST request)
151 - * @return mixed (true on success, error string on failure)
152 - */
 150+ * Verify and clean up parameters (e.g. from POST request)
 151+ * @return mixed (true on success, error string on failure)
 152+ */
153153 protected function doCheckParameters() {
154154 # Load old config settings from the master
155155 $this->oldConfig = FRPageConfig::getStabilitySettings( $this->page, FR_MASTER );
@@ -161,18 +161,18 @@
162162 }
163163
164164 /*
165 - * @return mixed (true on success, error string on failure)
166 - */
 165+ * @return mixed (true on success, error string on failure)
 166+ */
167167 protected function reallyDoCheckParameters() {
168168 return true;
169169 }
170170
171171 /*
172 - * Can the user change the settings for this page?
173 - * Note: if the current autoreview restriction is too high for this user
174 - * then this will return false. Useful for form selectors.
175 - * @return bool
176 - */
 172+ * Can the user change the settings for this page?
 173+ * Note: if the current autoreview restriction is too high for this user
 174+ * then this will return false. Useful for form selectors.
 175+ * @return bool
 176+ */
177177 public function isAllowed() {
178178 # Users who cannot edit or review the page cannot set this
179179 return ( $this->page
@@ -183,9 +183,9 @@
184184 }
185185
186186 /*
187 - * Preload existing page settings (e.g. from GET request).
188 - * @return mixed (true on success, error string on failure)
189 - */
 187+ * Preload existing page settings (e.g. from GET request).
 188+ * @return mixed (true on success, error string on failure)
 189+ */
190190 public function doPreloadParameters() {
191191 $oldConfig = $this->getOldConfig();
192192 if ( $oldConfig['expiry'] == Block::infinity() ) {
@@ -197,17 +197,17 @@
198198 }
199199
200200 /*
201 - * @return mixed (true on success, error string on failure)
202 - */
 201+ * @return mixed (true on success, error string on failure)
 202+ */
203203 protected function reallyDoPreloadParameters() {
204204 return true;
205205 }
206206
207207 /**
208 - * Submit the form parameters for the page config to the DB.
209 - *
210 - * @return mixed (true on success, error string on failure)
211 - */
 208+ * Submit the form parameters for the page config to the DB.
 209+ *
 210+ * @return mixed (true on success, error string on failure)
 211+ */
212212 public function doSubmit() {
213213 # Double-check permissions
214214 if ( !$this->isAllowed() ) {
@@ -263,11 +263,11 @@
264264 }
265265
266266 /*
267 - * Do history & log updates:
268 - * (a) Add a new stability log entry
269 - * (b) Add a null edit like the log entry
270 - * @return Revision
271 - */
 267+ * Do history & log updates:
 268+ * (a) Add a new stability log entry
 269+ * (b) Add a null edit like the log entry
 270+ * @return Revision
 271+ */
272272 protected function updateLogsAndHistory( FlaggableWikiPage $article ) {
273273 global $wgContLang;
274274 $newConfig = $this->getNewConfig();
@@ -311,9 +311,9 @@
312312 }
313313
314314 /*
315 - * Get current stability config array
316 - * @return array
317 - */
 315+ * Get current stability config array
 316+ * @return array
 317+ */
318318 public function getOldConfig() {
319319 if ( $this->getState() == self::FORM_UNREADY ) {
320320 throw new MWException( __CLASS__ . " input fields not set yet.\n");
@@ -325,9 +325,9 @@
326326 }
327327
328328 /*
329 - * Get proposed stability config array
330 - * @return array
331 - */
 329+ * Get proposed stability config array
 330+ * @return array
 331+ */
332332 public function getNewConfig() {
333333 return array(
334334 'override' => $this->override,
@@ -337,9 +337,9 @@
338338 }
339339
340340 /*
341 - * (a) Watch page if $watchThis is true
342 - * (b) Unwatch if $watchThis is false
343 - */
 341+ * (a) Watch page if $watchThis is true
 342+ * (b) Unwatch if $watchThis is false
 343+ */
344344 protected function updateWatchlist() {
345345 # Apply watchlist checkbox value (may be NULL)
346346 if ( $this->watchThis === true ) {
Index: trunk/extensions/FlaggedRevs/FlaggedRevs.setup.php
@@ -5,7 +5,7 @@
66 * Note: avoid FlaggedRevs class calls here for performance (like load.php).
77 */
88 class FlaggedRevsSetup {
9 - /* Variable checked by FlaggedRevs::load() */
 9+ /* Status of whether FlaggedRevs::load() can be called */
1010 protected static $canLoad = false;
1111
1212 /**

Status & tagging log