jenkins-bot has submitted this change and it was merged.

Change subject: Fix for field quoting in "order by"
......................................................................


Fix for field quoting in "order by"

Change-Id: Iace9584c07a1d630b43563db9e279b10077dfdb7
---
M CargoSQLQuery.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Yaron Koren: Checked; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/CargoSQLQuery.php b/CargoSQLQuery.php
index 9dc4346..61984e6 100644
--- a/CargoSQLQuery.php
+++ b/CargoSQLQuery.php
@@ -354,7 +354,7 @@
                        // By default, sort on the first field.
                        reset( $this->mAliasedFieldNames );
                        $firstField = current( $this->mAliasedFieldNames );
-                       if ( strpos( $firstField, '(' ) === false ) {
+                       if ( strpos( $firstField, '(' ) === false && strpos( 
$firstField, '.' ) === false ) {
                                $this->mOrderByStr = 
$this->mCargoDB->addIdentifierQuotes( $firstField );
                        } else {
                                $this->mOrderByStr = $firstField;

-- 
To view, visit https://gerrit.wikimedia.org/r/282429
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Iace9584c07a1d630b43563db9e279b10077dfdb7
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Cargo
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren <yaro...@gmail.com>
Gerrit-Reviewer: Yaron Koren <yaro...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to