X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialComparePages.php;h=fc6b0c58c281d2ef27f3d8912b374550cc02b7bf;hb=b95a775c9855f7b7d781240e1062cc014957d703;hp=c3bd3feccf53d434e85ed25dc7bc8c86c87af676;hpb=96a5486ed0929ec49e370d2a7bfb5aabf89e4924;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialComparePages.php b/includes/specials/SpecialComparePages.php index c3bd3feccf..fc6b0c58c2 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; }