http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72457
Revision: 72457
Author: simetrical
Date: 2010-09-05 21:16:10 +0000 (Sun, 05 Sep 2010)
Log Message:
-----------
Update Collection and intersection for new schema
Not tested -- confirmation from someone that these changes work would be
appreciated. FlaggedRevs looks to use cl_sortkey somehow, but I don't
understand how, so if someone else could help out with that, that would
be nice. Does it need to be updated, and if so, how?
Modified Paths:
--------------
trunk/extensions/Collection/Collection.body.php
trunk/extensions/intersection/DynamicPageList.php
Modified: trunk/extensions/Collection/Collection.body.php
===================================================================
--- trunk/extensions/Collection/Collection.body.php 2010-09-05 20:43:00 UTC
(rev 72456)
+++ trunk/extensions/Collection/Collection.body.php 2010-09-05 21:16:10 UTC
(rev 72457)
@@ -672,10 +672,10 @@
}
$db = wfGetDB( DB_SLAVE );
$tables = array( 'page', 'categorylinks' );
- $fields = array( 'cl_from', 'cl_sortkey', 'page_namespace',
'page_title' );
+ $fields = array( 'page_namespace', 'page_title' );
$options = array(
'USE INDEX' => 'cl_sortkey',
- 'ORDER BY' => 'cl_sortkey',
+ 'ORDER BY' => 'cl_type, cl_sortkey',
'LIMIT' => $limit + 1,
);
$where = array(
Modified: trunk/extensions/intersection/DynamicPageList.php
===================================================================
--- trunk/extensions/intersection/DynamicPageList.php 2010-09-05 20:43:00 UTC
(rev 72456)
+++ trunk/extensions/intersection/DynamicPageList.php 2010-09-05 21:16:10 UTC
(rev 72457)
@@ -499,7 +499,7 @@
$sSqlSort = 'page_id'; # Since they're never reused and
increasing
break;
case 'categorysortkey':
- $sSqlSort = 'c1.cl_sortkey';
+ $sSqlSort = "c1.cl_type $sSqlOrder, c1.cl_sortkey";
break;
case 'popularity':
$sSqlSort = 'page_counter';
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs