r83563 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r83562‎ | r83563 | r83564 >
Date:01:13, 9 March 2011
Author:catrope
Status:ok (Comments)
Tags:
Comment:
Merge r83652 from 1.17wmf1 to trunk: add backwards compatibility from &from= and &until= on category pages to keep things like alphabet templates working
Modified paths:
  • /trunk/phase3/includes/CategoryPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/CategoryPage.php
@@ -70,10 +70,14 @@
7171 function closeShowCategory() {
7272 global $wgOut, $wgRequest;
7373
 74+ // Use these as defaults for back compat --catrope
 75+ $oldFrom = $wgRequest->getVal( 'from' );
 76+ $oldUntil = $wgRequest->getVal( 'until' );
 77+
7478 $from = $until = array();
7579 foreach ( array( 'page', 'subcat', 'file' ) as $type ) {
76 - $from[$type] = $wgRequest->getVal( "{$type}from" );
77 - $until[$type] = $wgRequest->getVal( "{$type}until" );
 80+ $from[$type] = $wgRequest->getVal( "{$type}from", $oldFrom );
 81+ $until[$type] = $wgRequest->getVal( "{$type}until", $oldUntil );
7882 }
7983
8084 $viewer = new $this->mCategoryViewerClass( $this->mTitle, $from, $until, $wgRequest->getValues() );
@@ -344,7 +348,7 @@
345349 array( 'page_id', 'page_title', 'page_namespace', 'page_len',
346350 'page_is_redirect', 'cl_sortkey', 'cat_id', 'cat_title',
347351 'cat_subcats', 'cat_pages', 'cat_files', 'cl_sortkey_prefix' ),
348 - array( 'cl_to' => $this->title->getDBkey() ) + $extraConds,
 352+ array_merge( array( 'cl_to' => $this->title->getDBkey() ), $extraConds ),
349353 __METHOD__,
350354 array(
351355 'USE INDEX' => array( 'categorylinks' => 'cl_sortkey' ),
Property changes on: trunk/phase3/includes/CategoryPage.php
___________________________________________________________________
Added: svn:mergeinfo
352356 Merged /branches/new-installer/phase3/includes/CategoryPage.php:r43664-66004
353357 Merged /branches/wmf-deployment/includes/CategoryPage.php:r53381
354358 Merged /branches/wmf/1.17wmf1/includes/CategoryPage.php:r83562
355359 Merged /branches/REL1_15/phase3/includes/CategoryPage.php:r51646
356360 Merged /branches/sqlite/includes/CategoryPage.php:r58211-58321

Follow-up revisions

RevisionCommit summaryAuthorDate
r99332(bug 31549; follow-up r83563) Do not include old-style from links in nav link...bawolff03:50, 9 October 2011

Comments

#Comment by Reach Out to the Truth (talk | contribs)   03:15, 9 March 2011

That's r83562.

Status & tagging log