Index: trunk/extensions/FlaggedRevs/FlaggedRevs.php |
— | — | @@ -519,22 +519,30 @@ |
520 | 520 | * Also sets $wgSpecialPages just to be consistent. |
521 | 521 | */ |
522 | 522 | function efLoadFlaggedRevsSpecialPages( &$list ) { |
523 | | - global $wgSpecialPages, $wgFlaggedRevsNamespaces, $wgFlaggedRevsOverride, $wgFlaggedRevsProtectLevels; |
| 523 | + global $wgSpecialPages, $wgUseTagFilter; |
| 524 | + global $wgFlaggedRevsNamespaces, $wgFlaggedRevsOverride, $wgFlaggedRevsProtectLevels; |
| 525 | + // Show special pages only if FlaggedRevs is enabled on some namespaces |
524 | 526 | if( !empty($wgFlaggedRevsNamespaces) ) { |
525 | 527 | $list['RevisionReview'] = $wgSpecialPages['RevisionReview'] = 'RevisionReview'; |
526 | 528 | $list['StableVersions'] = $wgSpecialPages['StableVersions'] = 'StableVersions'; |
527 | | - if( empty($wgFlaggedRevsProtectLevels) ) |
| 529 | + // Protect levels define allowed stability settings |
| 530 | + if( empty($wgFlaggedRevsProtectLevels) ) { |
528 | 531 | $list['Stabilization'] = $wgSpecialPages['Stabilization'] = 'Stabilization'; |
| 532 | + } |
529 | 533 | $list['UnreviewedPages'] = $wgSpecialPages['UnreviewedPages'] = 'UnreviewedPages'; |
530 | 534 | $list['OldReviewedPages'] = $wgSpecialPages['OldReviewedPages'] = 'OldReviewedPages'; |
531 | | - $list['ProblemChanges'] = $wgSpecialPages['ProblemChanges'] = 'ProblemChanges'; |
| 535 | + // Show tag filtered pending edit page if there are tags |
| 536 | + if( $wgUseTagFilter && ChangeTags::listDefinedTags() ) { |
| 537 | + $list['ProblemChanges'] = $wgSpecialPages['ProblemChanges'] = 'ProblemChanges'; |
| 538 | + } |
532 | 539 | $list['ReviewedPages'] = $wgSpecialPages['ReviewedPages'] = 'ReviewedPages'; |
533 | 540 | $list['QualityOversight'] = $wgSpecialPages['QualityOversight'] = 'QualityOversight'; |
534 | 541 | $list['ValidationStatistics'] = $wgSpecialPages['ValidationStatistics'] = 'ValidationStatistics'; |
535 | | - if( !$wgFlaggedRevsOverride ) |
| 542 | + if( !$wgFlaggedRevsOverride ) { |
536 | 543 | $list['StablePages'] = $wgSpecialPages['StablePages'] = 'StablePages'; |
537 | | - else |
| 544 | + } else { |
538 | 545 | $list['UnstablePages'] = $wgSpecialPages['UnstablePages'] = 'UnstablePages'; |
| 546 | + } |
539 | 547 | } |
540 | 548 | return true; |
541 | 549 | } |
Index: trunk/extensions/FlaggedRevs/language/ProblemChanges.i18n.php |
— | — | @@ -9,7 +9,7 @@ |
10 | 10 | |
11 | 11 | $messages['en'] = array( |
12 | 12 | 'problemchanges' => 'Review tagged changes', |
13 | | - 'problemchanges-legend' => 'List reviewed pages with tagged edits pending review', |
| 13 | + 'problemchanges-legend' => 'List pages with tagged edits pending review', |
14 | 14 | 'problemchanges-none' => 'There are currently no pages meeting these criteria', |
15 | 15 | 'problemchanges-category' => 'Category:', |
16 | 16 | ); |
Index: trunk/extensions/FlaggedRevs/specialpages/ProblemChanges_body.php |
— | — | @@ -71,20 +71,19 @@ |
72 | 72 | "</fieldset></form>"; |
73 | 73 | # Add filter options |
74 | 74 | $wgOut->addHTML( $form ); |
75 | | - # Add list output (skip if no tag given) |
76 | | - $num = strlen($this->tag) && $pager->getNumRows(); |
77 | | - if( $num ) { |
| 75 | + # Add list output |
| 76 | + if( $pager->getNumRows() ) { |
78 | 77 | $wgOut->addHTML( $pager->getNavigationBar() ); |
79 | 78 | $wgOut->addHTML( $pager->getBody() ); |
80 | 79 | $wgOut->addHTML( $pager->getNavigationBar() ); |
81 | | - } else if( strlen($this->tag) ) { |
| 80 | + } else { |
82 | 81 | $wgOut->addHTML( wfMsgExt('problemchanges-none', array('parse') ) ); |
83 | 82 | } |
84 | 83 | // If this page is transcluded... |
85 | 84 | } else { |
86 | | - if( strlen($this->tag) && $pager->getNumRows() ) { |
| 85 | + if( $pager->getNumRows() ) { |
87 | 86 | $wgOut->addHTML( $pager->getBody() ); |
88 | | - } else if( strlen($this->tag) ) { |
| 87 | + } else { |
89 | 88 | $wgOut->addHTML( wfMsgExt('problemchanges-none', array('parse') ) ); |
90 | 89 | } |
91 | 90 | } |
— | — | @@ -299,7 +298,9 @@ |
300 | 299 | $conds[] = 'rev_page = fp_page_id'; |
301 | 300 | $conds[] = 'rev_id > fp_stable'; |
302 | 301 | $conds[] = 'ct_rev_id = rev_id'; |
303 | | - $conds['ct_tag'] = $this->tag; |
| 302 | + if( $this->tag != '' ) { |
| 303 | + $conds['ct_tag'] = $this->tag; |
| 304 | + } |
304 | 305 | $conds[] = 'page_id = fp_page_id'; |
305 | 306 | $useIndex = array('flaggedpages' => 'fp_pending_since', 'change_tag' => $ctIndex); |
306 | 307 | # Filter by category |