r70418 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r70417‎ | r70418 | r70419 >
Date:20:50, 3 August 2010
Author:simetrical
Status:reverted
Tags:
Comment:
Fix bug in sorting due to $wgRequest eating nulls

I'll fix this up so that the query string looks nicer later. Embedding
nulls in query strings is not a great idea.
Modified paths:
  • /trunk/phase3/includes/CategoryPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/CategoryPage.php
@@ -55,11 +55,14 @@
5656
5757 $from = $until = array();
5858 foreach ( array( 'page', 'subcat', 'file' ) as $type ) {
59 - $from[$type] = $wgRequest->getVal( "{$type}from" );
60 - $until[$type] = $wgRequest->getVal( "{$type}until" );
 59+ # Use $_GET instead of $wgRequest, because the latter helpfully
 60+ # normalizes Unicode, which removes nulls. TODO: do something
 61+ # smarter than passing nulls in URLs. :/
 62+ $from[$type] = isset( $_GET["{$type}from"] ) ? $_GET["{$type}from"] : null;
 63+ $until[$type] = isset( $_GET["{$type}until"] ) ? $_GET["{$type}until"] : null;
6164 }
6265
63 - $viewer = new CategoryViewer( $this->mTitle, $from, $until, $wgRequest->getValues() );
 66+ $viewer = new CategoryViewer( $this->mTitle, $from, $until, $_GET );
6467 $wgOut->addHTML( $viewer->getHTML() );
6568 }
6669 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r70959Hacky r70418 makes this global unused.platonides14:34, 12 August 2010
r80616Revert r70418, r70959: direct use of $_GET is not needed anymore since we no ...tstarling06:42, 20 January 2011

Status & tagging log