Ok, answered my own question, a patch that seems to be working is below.
the .reverse() in:
caught my eye, why did it need to be reversed when the sort order was already specified? Of course, this works when there are < $limit sites to display, but it explains the behavior when there are > $limit sites.
Also, the “1 - 21 of 23” is fixed, can someone verify this fix on a site that has < 20 sites?
--- common_ORIGINAL.js 2010-02-18 23:12:06.740830000 -0800
+++ common.js 2010-02-19 00:35:18.918321000 -0800
@@ -46,7 +46,7 @@
allSites = limitBy(allSites, params);
- displayRows(allSites.reverse(), params);
+ displayRows(allSites, params);
params['sitesVisible'] = allSites;
@@ -200,7 +200,7 @@
var start = (params['page'] - 1) * params['limit'] + 1;
var count = allSites.length;
- var end = parseInt(start) + parseInt(params['limit']);
+ var end = parseInt(start) + parseInt(params['limit'] - 1);
if(end > count) end = count;
html = '<span>' + (start ) + ' - ' + end + ' of ' + count + '</span>';
and in plugins/MultiSites/Controller.php, change:
protected $order = ‘desc’;
protected $order = ‘asc’;
However, when the table headers are clicked on, the green arrow indicating sort order is now incorrect. I’ve taken a look at the sort function and it looks correct, but there is some sort of disconnect between sort order and arrow indication.