diff options
Diffstat (limited to 'includes/specials/SpecialComparePages.php')
-rw-r--r-- | includes/specials/SpecialComparePages.php | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/includes/specials/SpecialComparePages.php b/includes/specials/SpecialComparePages.php index c3bd3fec..fc6b0c58 100644 --- a/includes/specials/SpecialComparePages.php +++ b/includes/specials/SpecialComparePages.php @@ -110,7 +110,7 @@ class SpecialComparePages extends SpecialPage { $rev1 = self::revOrTitle( $data['Revision1'], $data['Page1'] ); $rev2 = self::revOrTitle( $data['Revision2'], $data['Page2'] ); - if( $rev1 && $rev2 ) { + if ( $rev1 && $rev2 ) { $revision = Revision::newFromId( $rev1 ); if ( $revision ) { // NOTE: $rev1 was already checked, should exist. @@ -128,14 +128,15 @@ class SpecialComparePages extends SpecialPage { } public static function revOrTitle( $revision, $title ) { - if( $revision ) { + if ( $revision ) { return $revision; - } elseif( $title ) { + } elseif ( $title ) { $title = Title::newFromText( $title ); - if( $title instanceof Title ) { + if ( $title instanceof Title ) { return $title->getLatestRevID(); } } + return null; } @@ -150,6 +151,7 @@ class SpecialComparePages extends SpecialPage { if ( !$title->exists() ) { return $this->msg( 'compare-title-not-exists' )->parseAsBlock(); } + return true; } @@ -161,6 +163,7 @@ class SpecialComparePages extends SpecialPage { if ( $revision === null ) { return $this->msg( 'compare-revision-not-exists' )->parseAsBlock(); } + return true; } |