r39398 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r39397‎ | r39398 | r39399 >
Date:08:06, 15 August 2008
Author:siebrand
Status:old
Tags:
Comment:
(bug 14971) Added method for alphabetical ordering ('alphabetical') (patch by Ramac)
Modified paths:
  • /trunk/extensions/intersection/DynamicPageList.php (modified) (history)

Diff [purge]

Index: trunk/extensions/intersection/DynamicPageList.php
@@ -1,6 +1,6 @@
22 <?php
33 /*
4 -
 4+
55 Purpose: outputs a bulleted list of most recent
66 items residing in a category, or a union
77 of several categories.
@@ -195,6 +195,9 @@
196196 case 'lastedit':
197197 $sOrderMethod = 'lastedit';
198198 break;
 199+ case 'alphabetical':
 200+ $sOrderMethod = 'alphabetical';
 201+ break;
199202 case 'categoryadd':
200203 default:
201204 $sOrderMethod = 'categoryadd';
@@ -331,7 +334,7 @@
332335 $sSqlWhere = ' WHERE page_namespace='.$iNamespace.' ';
333336 else
334337 $sSqlWhere = ' WHERE 1=1 ';
335 -
 338+
336339 // Bug 14943 - Allow filtering based on FlaggedRevs stability.
337340 // Check if the extension actually exists before changing the query...
338341 if( function_exists('efLoadFlaggedRevs') ) {
@@ -341,6 +344,10 @@
342345 if( in_array($sStable,$filterSet) || in_array($sQuality,$filterSet) ) {
343346 $sSqlSelectFrom .= " LEFT JOIN $flaggedpages ON page_id = fp_page_id";
344347 }
 348+ else if ('alphabetical' == $sOrderMethod) {
 349+ $sSqlWhere .= ' ORDER BY page_title ';
 350+ }
 351+
345352 switch( $sStable )
346353 {
347354 case 'only':

Follow-up revisions

RevisionCommit summaryAuthorDate
r39617Revert r39398 "(bug 14971) Added method for alphabetical ordering ('alphabeti...brion21:17, 18 August 2008

Status & tagging log