Index: trunk/extensions/FlaggedRevs/FlaggedArticleView.php |
— | — | @@ -380,9 +380,8 @@ |
381 | 381 | $srev->getRevId(), $revsSince ); |
382 | 382 | } |
383 | 383 | $icon = ''; |
384 | | - # Show if this the stable or draft, unless tabs already do that |
385 | | - # and there is only review tier (making icon redundant). |
386 | | - if ( !FlaggedRevs::versionTabsShown() || FlaggedRevs::qualityVersions() ) { |
| 384 | + # For protection based configs, show lock only if it's not redundant. |
| 385 | + if ( $this->showRatingIcon() ) { |
387 | 386 | $icon = $synced |
388 | 387 | ? FlaggedRevsXML::stableStatusIcon( $quality ) |
389 | 388 | : FlaggedRevsXML::draftStatusIcon(); |
— | — | @@ -446,9 +445,8 @@ |
447 | 446 | // Simple icon-based UI |
448 | 447 | if ( FlaggedRevs::useSimpleUI() ) { |
449 | 448 | $icon = ''; |
450 | | - # Show if this the stable or draft, unless tabs already do that |
451 | | - # and there is only review tier (making icon redundant). |
452 | | - if ( !FlaggedRevs::versionTabsShown() || FlaggedRevs::qualityVersions() ) { |
| 449 | + # For protection based configs, show lock only if it's not redundant. |
| 450 | + if ( $this->showRatingIcon() ) { |
453 | 451 | $icon = FlaggedRevsXML::stableStatusIcon( $quality ); |
454 | 452 | } |
455 | 453 | $revsSince = FlaggedRevs::getRevCountSince( $this->article, $srev->getRevId() ); |
— | — | @@ -527,9 +525,8 @@ |
528 | 526 | // Simple icon-based UI |
529 | 527 | if ( FlaggedRevs::useSimpleUI() ) { |
530 | 528 | $icon = ''; |
531 | | - # Show if this the stable or draft, unless tabs already do that |
532 | | - # and there is only review tier (making icon redundant). |
533 | | - if ( !FlaggedRevs::versionTabsShown() || FlaggedRevs::qualityVersions() ) { |
| 529 | + # For protection based configs, show lock only if it's not redundant. |
| 530 | + if ( $this->showRatingIcon() ) { |
534 | 531 | $icon = FlaggedRevsXML::stableStatusIcon( $quality ); |
535 | 532 | } |
536 | 533 | if ( !$wgUser->getId() ) { |
— | — | @@ -582,6 +579,16 @@ |
583 | 580 | } |
584 | 581 | return ''; |
585 | 582 | } |
| 583 | + |
| 584 | + // Show icons for draft/stable/old reviewed versions |
| 585 | + protected function showRatingIcon() { |
| 586 | + if ( FlaggedRevs::forDefaultVersionOnly() ) { |
| 587 | + // If there is only on quality level and we have tabs to know |
| 588 | + // which version we are looking at, then just use the lock icon... |
| 589 | + return ( !FlaggedRevs::versionTabsShown() || FlaggedRevs::qualityVersions() ); |
| 590 | + } |
| 591 | + return true; |
| 592 | + } |
586 | 593 | |
587 | 594 | /** |
588 | 595 | * @param FlaggedRevision $srev, stable version |