From: Rob Church Date: Wed, 17 May 2006 20:56:49 +0000 (+0000) Subject: * (bug 4873) Don't overwrite the subtitle navigation when viewing a redirect page... X-Git-Tag: 1.31.0-rc.0~57098 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=e1d4ed703a3888fd8442c9f53be9f662374828f5;p=lhc%2Fweb%2Fwiklou.git * (bug 4873) Don't overwrite the subtitle navigation when viewing a redirect page that isn't current * Enforce the standard upper limit when accessing page histories --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 6be5d8f6c5..dc92491f36 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -289,6 +289,12 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 839) Add URLENCODE magic word * (bug 6004) Update for Polish language (pl) * (bug 5971) Improvement to German localisation (de) +* (bug 4873) Don't overwrite the subtitle navigation when viewing a redirect page + that isn't current +* Enforce the standard upper limit when accessing page histories +======= + +>>>>>>> .theirs == Compatibility == diff --git a/includes/Article.php b/includes/Article.php index 945f5c5da0..d4a3cdef44 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -893,7 +893,8 @@ class Article { # Display redirect $imageDir = $wgContLang->isRTL() ? 'rtl' : 'ltr'; $imageUrl = $wgStylePath.'/common/images/redirect' . $imageDir . '.png'; - if( !$wasRedirected ) { + # Don't overwrite the subtitle if this was an old revision + if( !$wasRedirected && $this->isCurrent() ) { $wgOut->setSubtitle( wfMsgHtml( 'redirectpagesub' ) ); } $targetUrl = $rt->escapeLocalURL(); diff --git a/includes/PageHistory.php b/includes/PageHistory.php index 4cfee47a89..e177599bce 100644 --- a/includes/PageHistory.php +++ b/includes/PageHistory.php @@ -87,8 +87,7 @@ class PageHistory { * Extract limit, the number of revisions to show, and * offset, the timestamp to begin at, from the URL. */ - $limit = $wgRequest->getInt('limit', $this->defaultLimit); - $offset = $wgRequest->getText('offset'); + list( $limit, $offset ) = wfCheckLimits( $this->defaultLimit ); /* Offset must be an integral. */ if (!strlen($offset) || !preg_match("/^[0-9]+$/", $offset))