Index: trunk/extensions/intersection/DynamicPageList.php |
— | — | @@ -1,6 +1,6 @@ |
2 | 2 | <?php |
3 | 3 | /* |
4 | | - |
| 4 | + |
5 | 5 | Purpose: outputs a bulleted list of most recent |
6 | 6 | items residing in a category, or a union |
7 | 7 | of several categories. |
— | — | @@ -195,6 +195,9 @@ |
196 | 196 | case 'lastedit': |
197 | 197 | $sOrderMethod = 'lastedit'; |
198 | 198 | break; |
| 199 | + case 'alphabetical': |
| 200 | + $sOrderMethod = 'alphabetical'; |
| 201 | + break; |
199 | 202 | case 'categoryadd': |
200 | 203 | default: |
201 | 204 | $sOrderMethod = 'categoryadd'; |
— | — | @@ -331,7 +334,7 @@ |
332 | 335 | $sSqlWhere = ' WHERE page_namespace='.$iNamespace.' '; |
333 | 336 | else |
334 | 337 | $sSqlWhere = ' WHERE 1=1 '; |
335 | | - |
| 338 | + |
336 | 339 | // Bug 14943 - Allow filtering based on FlaggedRevs stability. |
337 | 340 | // Check if the extension actually exists before changing the query... |
338 | 341 | if( function_exists('efLoadFlaggedRevs') ) { |
— | — | @@ -341,6 +344,10 @@ |
342 | 345 | if( in_array($sStable,$filterSet) || in_array($sQuality,$filterSet) ) { |
343 | 346 | $sSqlSelectFrom .= " LEFT JOIN $flaggedpages ON page_id = fp_page_id"; |
344 | 347 | } |
| 348 | + else if ('alphabetical' == $sOrderMethod) { |
| 349 | + $sSqlWhere .= ' ORDER BY page_title '; |
| 350 | + } |
| 351 | + |
345 | 352 | switch( $sStable ) |
346 | 353 | { |
347 | 354 | case 'only': |