jenkins-bot has submitted this change and it was merged.
Change subject: DynamicPageList: Use more standard LIMIT syntax
......................................................................
DynamicPageList: Use more standard LIMIT syntax
MySQL offers a syntax of LIMIT $offset,$limit.
PostgreSQL does not, so use the mutually compatible
syntax of LIMIT $limit OFFSET $offset.
Many other extensions might have a same problem,
candidates can be found with:
grep --include=*.php -P 'LIMIT\b[^"'\'']*,' -r .
Bug: 68994
Change-Id: Ie1439673ab825cd8b0c47a63f2cc371ff2569d02
---
M DPLMain.php
1 file changed, 1 insertion(+), 2 deletions(-)
Approvals:
Theaitetos: Checked; Looks good to me, approved
jenkins-bot: Verified
diff --git a/DPLMain.php b/DPLMain.php
index 727a546..ffefac1 100644
--- a/DPLMain.php
+++ b/DPLMain.php
@@ -2484,9 +2484,8 @@
// LIMIT ....
// we must switch off LIMITS when going for categories as output goal
(due to mysql limitations)
if ( (!ExtDynamicPageList::$allowUnlimitedResults || $iCount>=0) &&
$sGoal != 'categories' ) {
- $sSqlWhere .= " LIMIT $iOffset, ";
if ($iCount<0)
$iCount=intval(ExtDynamicPageList::$options['count']['default']);
- $sSqlWhere .= $iCount;
+ $sSqlWhere .= " LIMIT $iCount OFFSET $iOffset ";
}
// when we go for a list of categories as result we transform the
output of the normal query into a subquery
--
To view, visit https://gerrit.wikimedia.org/r/151265
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie1439673ab825cd8b0c47a63f2cc371ff2569d02
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DynamicPageList
Gerrit-Branch: master
Gerrit-Owner: Jjanes <[email protected]>
Gerrit-Reviewer: Theaitetos <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits