Brian Wolff has uploaded a new change for review.
https://gerrit.wikimedia.org/r/62721
Change subject: Fix typo causing sql error
......................................................................
Fix typo causing sql error
If doing ordermethod=popularity on a wiki with $wgDisableCounters
set to true, sql error results due to a spelling mistake (d'oh!).
Sufficed to say, that's rather embarassing :s
Also change how code handles an unknown value, in
the internal ordermethod variable, since that
should never happen.
bug: 46523
Change-Id: Ibc38d3a092e4cff3147f77f7cdb51ebc0ad54a0e
---
M DynamicPageList.php
1 file changed, 4 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/intersection
refs/changes/21/62721/1
diff --git a/DynamicPageList.php b/DynamicPageList.php
index 0db847c..1275ba8 100644
--- a/DynamicPageList.php
+++ b/DynamicPageList.php
@@ -302,7 +302,7 @@
if ( !$wgDisableCounters ) {
$orderMethod =
'popularity';
} else {
- $orderMethod =
'categoyadd'; // default if hitcounter disabled.
+ $orderMethod =
'categoryadd'; // default if hitcounter disabled.
}
break;
case 'categoryadd':
@@ -548,9 +548,11 @@
$sqlSort = 'page_counter';
break;
case 'categoryadd':
- default:
$sqlSort = 'c1.cl_timestamp';
break;
+ default:
+ # Should never reach here
+ throw new MWException( "Invalid ordermethod
$orderMethod" );
}
$options['ORDER BY'] = "$sqlSort $sqlOrder";
--
To view, visit https://gerrit.wikimedia.org/r/62721
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibc38d3a092e4cff3147f77f7cdb51ebc0ad54a0e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/intersection
Gerrit-Branch: REL1_20
Gerrit-Owner: Brian Wolff <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits