From: Brian Wolff Date: Sun, 9 Oct 2011 03:50:03 +0000 (+0000) Subject: (bug 31549; follow-up r83563) Do not include old-style from links in nav links on... X-Git-Tag: 1.31.0-rc.0~27181 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/operations/recherche.php?a=commitdiff_plain;h=8031e6dc4ed57a78962ddeaca9e436ba70e99d7b;p=lhc%2Fweb%2Fwiklou.git (bug 31549; follow-up r83563) Do not include old-style from links in nav links on categories. They can intefere with contradicting pageuntil links which breaks navigation in categories. Not including release notes since tagging 1.18, and first public release that had bug was 1.18. However bug was present in 1.17wmf1 --- diff --git a/includes/CategoryPage.php b/includes/CategoryPage.php index 8e7ee64ca7..1c9585f579 100644 --- a/includes/CategoryPage.php +++ b/includes/CategoryPage.php @@ -68,14 +68,27 @@ class CategoryPage extends Article { // Use these as defaults for back compat --catrope $oldFrom = $wgRequest->getVal( 'from' ); $oldUntil = $wgRequest->getVal( 'until' ); + + $reqArray = $wgRequest->getValues(); $from = $until = array(); foreach ( array( 'page', 'subcat', 'file' ) as $type ) { $from[$type] = $wgRequest->getVal( "{$type}from", $oldFrom ); $until[$type] = $wgRequest->getVal( "{$type}until", $oldUntil ); + + // Do not want old-style from/until propagating in nav links. + if ( !isset( $reqArray["{$type}from"] ) && isset( $reqArray["from"] ) ) { + $reqArray["{$type}from"] = $reqArray["from"]; + } + if ( !isset( $reqArray["{$type}to"] ) && isset( $reqArray["to"] ) ) { + $reqArray["{$type}to"] = $reqArray["to"]; + } } - $viewer = new $this->mCategoryViewerClass( $this->mTitle, $from, $until, $wgRequest->getValues() ); + unset( $reqArray["from"] ); + unset( $reqArray["to"] ); + + $viewer = new $this->mCategoryViewerClass( $this->mTitle, $from, $until, $reqArray ); $wgOut->addHTML( $viewer->getHTML() ); } }