Index: trunk/extensions/FlaggedRevs/FlaggedArticle.php |
— | — | @@ -864,17 +864,17 @@ |
865 | 865 | global $wgRequest, $wgUser, $wgFlaggedRevTabs; |
866 | 866 | |
867 | 867 | $title = $this->parent->getTitle()->getSubjectPage(); |
868 | | - if ( !FlaggedRevs::isPageReviewable( $title ) || !$title->exists() ) { |
869 | | - // Exit, since only reviewable pages need these tabs |
870 | | - return true; |
| 868 | + if ( !FlaggedRevs::isPageReviewable( $title ) ) { |
| 869 | + return true; // Only reviewable pages need these tabs |
871 | 870 | } |
872 | 871 | // Check if we should show a stabilization tab |
873 | 872 | if ( |
874 | 873 | !$skin->mTitle->isTalkPage() && |
875 | | - $wgUser->isAllowed( 'stablesettings' ) && |
876 | 874 | is_array( $actions ) && |
877 | 875 | !isset( $actions['protect'] ) && |
878 | | - !isset( $actions['unprotect'] ) |
| 876 | + !isset( $actions['unprotect'] ) && |
| 877 | + $wgUser->isAllowed( 'stablesettings' ) && |
| 878 | + $title->exists() |
879 | 879 | ) { |
880 | 880 | wfLoadExtensionMessages( 'Stabilization' ); |
881 | 881 | $stableTitle = SpecialPage::getTitleFor( 'Stabilization' ); |
— | — | @@ -910,8 +910,7 @@ |
911 | 911 | return true; |
912 | 912 | } |
913 | 913 | wfLoadExtensionMessages( 'FlaggedRevs' ); |
914 | | - $article = new Article( $title ); |
915 | | - $synced = FlaggedRevs::stableVersionIsSynced( $srev, $article ); |
| 914 | + $synced = FlaggedRevs::stableVersionIsSynced( $srev, $this->parent ); |
916 | 915 | if ( !$skin->mTitle->isTalkPage() && !$synced ) { |
917 | 916 | if ( isset( $views['edit'] ) ) { |
918 | 917 | if ( $this->showStableByDefault() ) { |
— | — | @@ -950,8 +949,7 @@ |
951 | 950 | if ( $this->pageOverride() || $wgRequest->getVal( 'stableid' ) ) { |
952 | 951 | // We are looking a the stable version |
953 | 952 | $tabs['stable']['class'] = 'selected'; |
954 | | - } |
955 | | - elseif ( |
| 953 | + } elseif ( |
956 | 954 | ( self::isViewAction( $action ) || $action == 'edit' ) && |
957 | 955 | !$skin->mTitle->isTalkPage() |
958 | 956 | ) { |