Index: trunk/extensions/FlaggedRevs/FlaggedRevs.php |
— | — | @@ -37,8 +37,8 @@ |
38 | 38 | define( 'FR_TEXT', 3 ); |
39 | 39 | |
40 | 40 | # Level constants... |
41 | | -if ( !defined( 'FR_SIGHTED' ) ) |
42 | | - define( 'FR_SIGHTED', 0 ); // "basic"/"checked" |
| 41 | +if ( !defined( 'FR_CHECKED' ) ) |
| 42 | + define( 'FR_CHECKED', 0 ); // "basic"/"checked" |
43 | 43 | if ( !defined( 'FR_QUALITY' ) ) |
44 | 44 | define( 'FR_QUALITY', 1 ); |
45 | 45 | if ( !defined( 'FR_PRISTINE' ) ) |
— | — | @@ -64,7 +64,7 @@ |
65 | 65 | # IMPORTANT: DO NOT EDIT THIS FILE |
66 | 66 | # When configuring globals, set them at LocalSettings.php instead |
67 | 67 | |
68 | | -# This will only distinguish "sighted", "quality", and unreviewed |
| 68 | +# This will only distinguish "checked", "quality", and unreviewed |
69 | 69 | # A small icon will show in the upper right hand corner |
70 | 70 | $wgSimpleFlaggedRevsUI = true; // @TODO: remove when ready |
71 | 71 | # For visitors, only show tags/icons for unreviewed/outdated pages |
— | — | @@ -91,7 +91,7 @@ |
92 | 92 | # (a) directly to the stable version by users with 'autoreview'/'bot' |
93 | 93 | # (b) self-reversions back to the stable version by any user |
94 | 94 | $wgFlaggedRevsAutoReview = true; |
95 | | -# If $wgFlaggedRevsAutoReview, auto-review new pages as minimally "sighted"? |
| 95 | +# If $wgFlaggedRevsAutoReview, auto-review new pages as minimally "checked"? |
96 | 96 | $wgFlaggedRevsAutoReviewNew = true; |
97 | 97 | |
98 | 98 | # Define the tags we can use to rate an article, number of levels, |
— | — | @@ -589,15 +589,15 @@ |
590 | 590 | $wgLogNames['review'] = 'review-logpage'; |
591 | 591 | $wgLogHeaders['review'] = 'review-logpagetext'; |
592 | 592 | # Various actions are used for log filtering ... |
593 | | -$wgLogActions['review/approve'] = 'review-logentry-app'; // sighted (again) |
| 593 | +$wgLogActions['review/approve'] = 'review-logentry-app'; // checked (again) |
594 | 594 | $wgLogActions['review/approve2'] = 'review-logentry-app'; // quality (again) |
595 | | -$wgLogActions['review/approve-i'] = 'review-logentry-app'; // sighted (first time) |
| 595 | +$wgLogActions['review/approve-i'] = 'review-logentry-app'; // checked (first time) |
596 | 596 | $wgLogActions['review/approve2-i'] = 'review-logentry-app'; // quality (first time) |
597 | | -$wgLogActions['review/approve-a'] = 'review-logentry-app'; // sighted (auto) |
| 597 | +$wgLogActions['review/approve-a'] = 'review-logentry-app'; // checked (auto) |
598 | 598 | $wgLogActions['review/approve2-a'] = 'review-logentry-app'; // quality (auto) |
599 | | -$wgLogActions['review/approve-ia'] = 'review-logentry-app'; // sighted (initial & auto) |
| 599 | +$wgLogActions['review/approve-ia'] = 'review-logentry-app'; // checked (initial & auto) |
600 | 600 | $wgLogActions['review/approve2-ia'] = 'review-logentry-app'; // quality (initial & auto) |
601 | | -$wgLogActions['review/unapprove'] = 'review-logentry-dis'; // was sighted |
| 601 | +$wgLogActions['review/unapprove'] = 'review-logentry-dis'; // was checked |
602 | 602 | $wgLogActions['review/unapprove2'] = 'review-logentry-dis'; // was quality |
603 | 603 | |
604 | 604 | # Add stable version log |
Index: trunk/extensions/FlaggedRevs/maintenance/reviewAllPages.inc |
— | — | @@ -21,7 +21,7 @@ |
22 | 22 | $blockEnd = $start + $BATCH_SIZE - 1; |
23 | 23 | $count = 0; |
24 | 24 | $changed = 0; |
25 | | - $flags = FlaggedRevs::quickTags( FR_SIGHTED ); // Assume basic level |
| 25 | + $flags = FlaggedRevs::quickTags( FR_CHECKED ); // Assume basic level |
26 | 26 | while( $blockEnd <= $end ) { |
27 | 27 | echo "...doing page_id from $blockStart to $blockEnd\n"; |
28 | 28 | $cond = "page_id BETWEEN $blockStart AND $blockEnd"; |
Index: trunk/extensions/FlaggedRevs/language/Stabilization.i18n.php |
— | — | @@ -60,7 +60,7 @@ |
61 | 61 | $messages['qqq'] = array( |
62 | 62 | 'stabilization-tab' => '{{Flagged Revs-small}} |
63 | 63 | |
64 | | -Some skins (e.g. standard/classic) display an additional tab to control visibility of the page revisions, e.g. whether last revision should be included or perhaps the last sighted or published version.', |
| 64 | +Some skins (e.g. standard/classic) display an additional tab to control visibility of the page revisions, e.g. whether last revision should be included or perhaps the last checked or published version.', |
65 | 65 | 'stabilization' => '{{Flagged Revs-small}} |
66 | 66 | Page title of Special:Stabilization.', |
67 | 67 | 'stabilization-text' => '{{Flagged Revs-small}} |
Index: trunk/extensions/FlaggedRevs/language/FlaggedRevs.i18n.php |
— | — | @@ -358,7 +358,7 @@ |
359 | 359 | 'revreview-hist-quality' => '{{Flagged Revs-small}} |
360 | 360 | The accuracy "quality", as displayed on the page history after a revision with this setting.', |
361 | 361 | 'revreview-hist-basic' => '{{Flagged Revs-small}} |
362 | | -The accuracy "sighted", as displayed on the page history after a revision with this setting.', |
| 362 | +The accuracy "checked", as displayed on the page history after a revision with this setting.', |
363 | 363 | 'revreview-hist-quality-user' => '{{Flagged Revs}}', |
364 | 364 | 'revreview-hist-basic-user' => '{{Flagged Revs}}', |
365 | 365 | 'revreview-hist-basic-auto' => '{{Flagged Revs}}', |
— | — | @@ -391,7 +391,7 @@ |
392 | 392 | 'revreview-accuracy-0' => '{{Flagged Revs-small}} |
393 | 393 | This is the default configuration, i.e. the revision has not (yet) been reviewed.', |
394 | 394 | 'revreview-accuracy-1' => '{{Flagged Revs-small}} |
395 | | -A basic check on vandalism ("sighted" as "has been seen/checked"). This configuration is considered as "flagged".', |
| 395 | +A basic check on vandalism ("checked" as "has been seen/checked"). This configuration is considered as "flagged".', |
396 | 396 | 'revreview-accuracy-2' => '{{Flagged Revs}}', |
397 | 397 | 'revreview-accuracy-3' => '{{Flagged Revs}}', |
398 | 398 | 'revreview-accuracy-4' => '{{Flagged Revs}} |
— | — | @@ -407,7 +407,7 @@ |
408 | 408 | 'revreview-basic-same' => '{{Flagged Revs}} |
409 | 409 | * Parameter $2 is the date of the approval', |
410 | 410 | 'revreview-basic-source' => '{{Flagged Revs-small}} |
411 | | -Displayed on the top of a page when you are viewing an old sighted version. |
| 411 | +Displayed on the top of a page when you are viewing an old checked version. |
412 | 412 | * Example: [http://de.wikipedia.org/w/index.php?title=Deutsche_Sprache&oldid=46894374 de.wikipedia]. |
413 | 413 | * Parameter $2 is the date of the approval', |
414 | 414 | 'revreview-failed' => '{{Flagged Revs}}', |
— | — | @@ -443,7 +443,7 @@ |
444 | 444 | {{Identical|Content page}}', |
445 | 445 | 'revreview-newest-basic' => '{{Flagged Revs}}', |
446 | 446 | 'revreview-newest-basic-i' => '{{Flagged Revs-small}} |
447 | | -Used in the "flagged revs box" when you are viewing the latest draft version, but when there is a sighted revision, the stable version. |
| 447 | +Used in the "flagged revs box" when you are viewing the latest draft version, but when there is a checked revision, the stable version. |
448 | 448 | |
449 | 449 | Example: [http://de.wikipedia.org/w/index.php?title=Deutsche_Sprache&stable=0 de.wikipedia]. |
450 | 450 | * Note, the example seems not to work, currently.', |
— | — | @@ -466,7 +466,7 @@ |
467 | 467 | 'revreview-quality-same' => '{{Flagged Revs}}', |
468 | 468 | 'revreview-quality-source' => "{{Flagged Revs-small}} |
469 | 469 | Displayed on the top of a page when you are viewing an old quality version. |
470 | | -* Example: [http://de.wikipedia.org/w/index.php?title=Deutsche_Sprache&oldid=46894374 de.wikipedia] (this is a sighted version, but it's the same for a quality version). |
| 470 | +* Example: [http://de.wikipedia.org/w/index.php?title=Deutsche_Sprache&oldid=46894374 de.wikipedia] (this is a checked version, but it's the same for a quality version). |
471 | 471 | * Parameter $2 is the date of the approval", |
472 | 472 | 'revreview-quality-title' => '{{Flagged Revs}}', |
473 | 473 | 'revreview-quick-basic' => '{{Flagged Revs}}', |
— | — | @@ -474,7 +474,7 @@ |
475 | 475 | 'revreview-quick-basic-same' => '{{Flagged Revs}}', |
476 | 476 | 'revreview-quick-invalid' => '{{Flagged Revs}}', |
477 | 477 | 'revreview-quick-none' => '{{Flagged Revs-small}} |
478 | | -Shown in the "flagged revs box" on the content page when there isn\'t any sighted or quality revision yet.', |
| 478 | +Shown in the "flagged revs box" on the content page when there isn\'t any checked or quality revision yet.', |
479 | 479 | 'revreview-quick-quality' => '{{Flagged Revs-small}} |
480 | 480 | Used in the "flagged revs box" when viewing a quality version, while there are new changes (in a draft version) to be reviewed.', |
481 | 481 | 'revreview-quick-quality-old' => '{{Flagged Revs}}', |
— | — | @@ -507,9 +507,9 @@ |
508 | 508 | 'revreview-submit-reviewed' => '{{Flagged Revs}}', |
509 | 509 | 'revreview-submit-unreviewed' => '{{Flagged Revs}}', |
510 | 510 | 'revreview-successful' => '{{Flagged Revs-small}} |
511 | | -Shown when a reviewer/editor has marked a revision as stable/sighted/... See also {{msg|revreview-successful2|pl=yes}}.', |
| 511 | +Shown when a reviewer/editor has marked a revision as stable/checked/... See also {{msg|revreview-successful2|pl=yes}}.', |
512 | 512 | 'revreview-successful2' => '{{Flagged Revs-small}} |
513 | | -Shown when a reviewer/editor has marked a stable/sighted/... revision as unstable/unsighted/... After that, it can normally be reviewed again. See also {{msg|revreview-successful|pl=yes}}.', |
| 513 | +Shown when a reviewer/editor has marked a stable/checked/... revision as unstable/unchecked/... After that, it can normally be reviewed again. See also {{msg|revreview-successful|pl=yes}}.', |
514 | 514 | 'revreview-text' => "{{Flagged Revs-small}} |
515 | 515 | Displayed in the review box for the reviewers' information.", |
516 | 516 | 'revreview-toggle-show' => '{{Optional}} |
Index: trunk/extensions/FlaggedRevs/FlaggedRevs.class.php |
— | — | @@ -771,7 +771,7 @@ |
772 | 772 | $data = array(); |
773 | 773 | $level = self::pristineVersions() ? FR_PRISTINE : FR_QUALITY; |
774 | 774 | if ( !self::qualityVersions() ) { |
775 | | - $level = FR_SIGHTED; |
| 775 | + $level = FR_CHECKED; |
776 | 776 | } |
777 | 777 | # Get the latest revision ID if not set |
778 | 778 | if ( !$latest ) { |
— | — | @@ -798,13 +798,13 @@ |
799 | 799 | ); |
800 | 800 | # If there is a revision of this level, track it... |
801 | 801 | # Revisions reviewed to one level count as reviewed |
802 | | - # at the lower levels (i.e. quality -> sighted). |
| 802 | + # at the lower levels (i.e. quality -> checked). |
803 | 803 | if ( $row ) { |
804 | 804 | $id = $row->fr_rev_id; |
805 | 805 | $ts = $row->rev_timestamp; |
806 | 806 | } else { |
807 | | - $id = $higherLevelId; // use previous (quality -> sighted) |
808 | | - $ts = $higherLevelTS; // use previous (quality -> sighted) |
| 807 | + $id = $higherLevelId; // use previous (quality -> checked) |
| 808 | + $ts = $higherLevelTS; // use previous (quality -> checked) |
809 | 809 | } |
810 | 810 | # Get edits that actually are pending... |
811 | 811 | if ( $id && $latest > $id ) { |
— | — | @@ -1156,7 +1156,7 @@ |
1157 | 1157 | /** |
1158 | 1158 | * Get the quality tier of review flags |
1159 | 1159 | * @param array $flags |
1160 | | - * @return int, flagging tier (-1 for non-sighted) |
| 1160 | + * @return int, flagging tier (-1 for non-checked) |
1161 | 1161 | */ |
1162 | 1162 | public static function getLevelTier( array $flags ) { |
1163 | 1163 | if ( self::isPristine( $flags ) ) { |
— | — | @@ -1164,7 +1164,7 @@ |
1165 | 1165 | } elseif ( self::isQuality( $flags ) ) { |
1166 | 1166 | return FR_QUALITY; // 1 |
1167 | 1167 | } elseif ( self::isSighted( $flags ) ) { |
1168 | | - return FR_SIGHTED; // 0 |
| 1168 | + return FR_CHECKED; // 0 |
1169 | 1169 | } |
1170 | 1170 | return -1; |
1171 | 1171 | } |
— | — | @@ -1326,7 +1326,7 @@ |
1327 | 1327 | $flags = self::getAutoReviewTags( $user, $oldSv->getTags() ); |
1328 | 1328 | } |
1329 | 1329 | } else { // new page? |
1330 | | - $flags = self::quickTags( FR_SIGHTED ); // use minimal level |
| 1330 | + $flags = self::quickTags( FR_CHECKED ); // use minimal level |
1331 | 1331 | } |
1332 | 1332 | if ( !is_array( $flags ) ) { |
1333 | 1333 | wfProfileOut( __METHOD__ ); |
Index: trunk/extensions/FlaggedRevs/forms/RevisionReviewForm.php |
— | — | @@ -644,7 +644,7 @@ |
645 | 645 | } |
646 | 646 | $oldFlags = $frev |
647 | 647 | ? $frev->getTags() // existing tags |
648 | | - : FlaggedRevs::quickTags( FR_SIGHTED ); // basic tags |
| 648 | + : FlaggedRevs::quickTags( FR_CHECKED ); // basic tags |
649 | 649 | |
650 | 650 | # If we are reviewing updates to a page, start off with the stable revision's |
651 | 651 | # flags. Otherwise, we just fill them in with the selected revision's flags. |
Index: trunk/extensions/FlaggedRevs/FlaggedRevision.php |
— | — | @@ -739,23 +739,23 @@ |
740 | 740 | * @return Array |
741 | 741 | */ |
742 | 742 | public static function expandRevisionTags( $tags ) { |
743 | | - # Set all flags to zero |
744 | 743 | $flags = array(); |
745 | 744 | foreach ( FlaggedRevs::getTags() as $tag ) { |
746 | | - $flags[$tag] = 0; |
| 745 | + $flags[$tag] = 0; // init all flags values to zero |
747 | 746 | } |
748 | 747 | $tags = str_replace( '\n', "\n", $tags ); // B/C, old broken rows |
| 748 | + // Tag string format is <tag:val\ntag:val\n...> |
749 | 749 | $tags = explode( "\n", $tags ); |
750 | 750 | foreach ( $tags as $tuple ) { |
751 | 751 | $set = explode( ':', $tuple, 2 ); |
752 | 752 | if ( count( $set ) == 2 ) { |
753 | 753 | list( $tag, $value ) = $set; |
754 | | - $value = intval( $value ); |
755 | | - # Add only currently recognized ones |
| 754 | + $value = max( 0, (int)$value ); // validate |
| 755 | + # Add only currently recognized tags |
756 | 756 | if ( isset( $flags[$tag] ) ) { |
757 | | - # If a level was removed, default to the highest |
758 | | - $flags[$tag] = $value < count( $levels ) ? |
759 | | - $value : count( $levels ) - 1; |
| 757 | + $levels = FlaggedRevs::getTagLevels( $tag ); |
| 758 | + # If a level was removed, default to the highest... |
| 759 | + $flags[$tag] = min( $value, count( $levels ) - 1 ); |
760 | 760 | } |
761 | 761 | } |
762 | 762 | } |
Index: trunk/extensions/FlaggedRevs/specialpages/PendingChanges_body.php |
— | — | @@ -302,7 +302,7 @@ |
303 | 303 | $namespace = $vnamespaces; |
304 | 304 | } |
305 | 305 | $this->namespace = $namespace; |
306 | | - # Sanity check level: 0 = sighted; 1 = quality; 2 = pristine |
| 306 | + # Sanity check level: 0 = checked; 1 = quality; 2 = pristine |
307 | 307 | $this->level = ( $level >= 0 && $level <= 2 ) ? $level : - 1; |
308 | 308 | $this->category = $category ? str_replace( ' ', '_', $category ) : null; |
309 | 309 | $this->size = ( $size !== null ) ? intval( $size ) : null; |
Index: trunk/extensions/FlaggedRevs/specialpages/QualityOversight_body.php |
— | — | @@ -90,7 +90,7 @@ |
91 | 91 | private function getActions() { |
92 | 92 | $actions = array( 'approve' => 1, 'approve2' => 1, 'approve-a' => 1, 'approve-i' => 1, |
93 | 93 | 'approve-ia' => 1, 'approve2-i' => 1, 'unapprove' => 1, 'unapprove2' => 1 ); |
94 | | - if ( $this->level === 0 ) { // sighted revisions |
| 94 | + if ( $this->level === 0 ) { // checked revisions |
95 | 95 | $actions['approve2'] = 0; |
96 | 96 | $actions['approve2-i'] = 0; |
97 | 97 | $actions['unapprove2'] = 0; |
Index: trunk/extensions/FlaggedRevs/specialpages/ProblemChanges_body.php |
— | — | @@ -278,7 +278,7 @@ |
279 | 279 | $this->mForm = $form; |
280 | 280 | # Must be a content page... |
281 | 281 | $this->namespace = FlaggedRevs::getReviewNamespaces(); |
282 | | - # Sanity check level: 0 = sighted; 1 = quality; 2 = pristine |
| 282 | + # Sanity check level: 0 = checked; 1 = quality; 2 = pristine |
283 | 283 | $this->level = ( $level >= 0 && $level <= 2 ) ? $level : - 1; |
284 | 284 | $this->tag = $tag; |
285 | 285 | $this->category = $category ? str_replace( ' ', '_', $category ) : null; |
Index: trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php |
— | — | @@ -876,7 +876,7 @@ |
877 | 877 | $quality = FlaggedRevs::getRevQuality( |
878 | 878 | $rc->mAttribs['rc_cur_id'], $revId, FR_MASTER ); |
879 | 879 | // Reviewed => patrolled |
880 | | - if ( $quality !== false && $quality >= FR_SIGHTED ) { |
| 880 | + if ( $quality !== false && $quality >= FR_CHECKED ) { |
881 | 881 | RevisionReviewForm::updateRecentChanges( $rc->getTitle(), $revId ); |
882 | 882 | $rc->mAttribs['rc_patrolled'] = 1; // make sure irc/email notifs know status |
883 | 883 | } |
— | — | @@ -1122,7 +1122,7 @@ |
1123 | 1123 | } |
1124 | 1124 | } |
1125 | 1125 | } |
1126 | | - # Check implicitly sighted edits |
| 1126 | + # Check implicitly checked edits |
1127 | 1127 | if ( $totalCheckedEditsNeeded && $wgFlaggedRevsAutoconfirm['totalCheckedEdits'] ) { |
1128 | 1128 | $dbr = wfGetDB( DB_SLAVE ); |
1129 | 1129 | $res = $dbr->select( array( 'revision', 'flaggedpages' ), '1', |
— | — | @@ -1316,7 +1316,7 @@ |
1317 | 1317 | return true; |
1318 | 1318 | } |
1319 | 1319 | } |
1320 | | - # Check implicitly sighted edits |
| 1320 | + # Check implicitly checked edits |
1321 | 1321 | if ( $totalCheckedEditsNeeded && $wgFlaggedRevsAutopromote['totalCheckedEdits'] ) { |
1322 | 1322 | $dbr = isset( $dbr ) ? $dbr : wfGetDB( DB_SLAVE ); |
1323 | 1323 | $res = $dbr->select( array( 'revision', 'flaggedpages' ), '1', |
Index: trunk/extensions/FlaggedRevs/api/ApiQueryReviewedpages.php |
— | — | @@ -173,7 +173,7 @@ |
174 | 174 | 'end' => 'Stop listing at this page id.', |
175 | 175 | 'namespace' => 'The namespaces to enumerate.', |
176 | 176 | 'filterredir' => 'How to filter for redirects', |
177 | | - 'filterlevel' => 'How to filter by quality (0=sighted,1=quality)', |
| 177 | + 'filterlevel' => 'How to filter by quality (0=checked,1=quality)', |
178 | 178 | 'limit' => 'How many total pages to return.', |
179 | 179 | 'dir' => array( |
180 | 180 | 'In which direction to list.', |
Index: trunk/extensions/FlaggedRevs/api/ApiQueryUnreviewedpages.php |
— | — | @@ -164,7 +164,7 @@ |
165 | 165 | 'end' => 'Stop listing at this page title.', |
166 | 166 | 'namespace' => 'The namespaces to enumerate.', |
167 | 167 | 'filterredir' => 'How to filter for redirects', |
168 | | - 'filterlevel' => 'How to filter by quality (0=sighted,1=quality)', |
| 168 | + 'filterlevel' => 'How to filter by quality (0=checked,1=quality)', |
169 | 169 | 'limit' => 'How many total pages to return.', |
170 | 170 | ); |
171 | 171 | } |