r53507 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r53506‎ | r53507 | r53508 >
Date:00:54, 20 July 2009
Author:aaron
Status:resolved
Tags:
Comment:
Minor performance & formatting tweaks
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedArticle.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedArticle.php
@@ -864,17 +864,17 @@
865865 global $wgRequest, $wgUser, $wgFlaggedRevTabs;
866866
867867 $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
871870 }
872871 // Check if we should show a stabilization tab
873872 if (
874873 !$skin->mTitle->isTalkPage() &&
875 - $wgUser->isAllowed( 'stablesettings' ) &&
876874 is_array( $actions ) &&
877875 !isset( $actions['protect'] ) &&
878 - !isset( $actions['unprotect'] )
 876+ !isset( $actions['unprotect'] ) &&
 877+ $wgUser->isAllowed( 'stablesettings' ) &&
 878+ $title->exists()
879879 ) {
880880 wfLoadExtensionMessages( 'Stabilization' );
881881 $stableTitle = SpecialPage::getTitleFor( 'Stabilization' );
@@ -910,8 +910,7 @@
911911 return true;
912912 }
913913 wfLoadExtensionMessages( 'FlaggedRevs' );
914 - $article = new Article( $title );
915 - $synced = FlaggedRevs::stableVersionIsSynced( $srev, $article );
 914+ $synced = FlaggedRevs::stableVersionIsSynced( $srev, $this->parent );
916915 if ( !$skin->mTitle->isTalkPage() && !$synced ) {
917916 if ( isset( $views['edit'] ) ) {
918917 if ( $this->showStableByDefault() ) {
@@ -950,8 +949,7 @@
951950 if ( $this->pageOverride() || $wgRequest->getVal( 'stableid' ) ) {
952951 // We are looking a the stable version
953952 $tabs['stable']['class'] = 'selected';
954 - }
955 - elseif (
 953+ } elseif (
956954 ( self::isViewAction( $action ) || $action == 'edit' ) &&
957955 !$skin->mTitle->isTalkPage()
958956 ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r56528Fixed bug from r53507 : talk page confused with article page for sync checkaaron15:36, 17 September 2009

Status & tagging log