r99332 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99331‎ | r99332 | r99333 >
Date:03:50, 9 October 2011
Author:bawolff
Status:ok
Tags:
Comment:
(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
Modified paths:
  • /trunk/phase3/includes/CategoryPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/CategoryPage.php
@@ -68,14 +68,27 @@
6969 // Use these as defaults for back compat --catrope
7070 $oldFrom = $wgRequest->getVal( 'from' );
7171 $oldUntil = $wgRequest->getVal( 'until' );
 72+
 73+ $reqArray = $wgRequest->getValues();
7274
7375 $from = $until = array();
7476 foreach ( array( 'page', 'subcat', 'file' ) as $type ) {
7577 $from[$type] = $wgRequest->getVal( "{$type}from", $oldFrom );
7678 $until[$type] = $wgRequest->getVal( "{$type}until", $oldUntil );
 79+
 80+ // Do not want old-style from/until propagating in nav links.
 81+ if ( !isset( $reqArray["{$type}from"] ) && isset( $reqArray["from"] ) ) {
 82+ $reqArray["{$type}from"] = $reqArray["from"];
 83+ }
 84+ if ( !isset( $reqArray["{$type}to"] ) && isset( $reqArray["to"] ) ) {
 85+ $reqArray["{$type}to"] = $reqArray["to"];
 86+ }
7787 }
7888
79 - $viewer = new $this->mCategoryViewerClass( $this->mTitle, $from, $until, $wgRequest->getValues() );
 89+ unset( $reqArray["from"] );
 90+ unset( $reqArray["to"] );
 91+
 92+ $viewer = new $this->mCategoryViewerClass( $this->mTitle, $from, $until, $reqArray );
8093 $wgOut->addHTML( $viewer->getHTML() );
8194 }
8295 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r1011261.18wmf1: MFT r98669, r99164, r99321, r99332, r99632, r99897, r99914, r99952,...catrope12:09, 28 October 2011
r101203REL1_18 MFT r99286, r99332, r100398, r100701, r101010reedy21:20, 28 October 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r83563Merge r83652 from 1.17wmf1 to trunk: add backwards compatibility from &from= ...catrope01:13, 9 March 2011

Status & tagging log