[MediaWiki-commits] [Gerrit] mediawiki...Cargo[master]: Fix for bcadef37f8d7 - added quoting of field names

2017-11-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/391471 )

Change subject: Fix for bcadef37f8d7 - added quoting of field names
..


Fix for bcadef37f8d7 - added quoting of field names

Change-Id: Iab2b2bc1207c60c9fc10a198994a18f592998e3d
---
M includes/parserfunctions/CargoStore.php
1 file changed, 3 insertions(+), 2 deletions(-)

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



diff --git a/includes/parserfunctions/CargoStore.php 
b/includes/parserfunctions/CargoStore.php
index 6dd0932..78c1b4f 100644
--- a/includes/parserfunctions/CargoStore.php
+++ b/includes/parserfunctions/CargoStore.php
@@ -301,10 +301,11 @@
continue;
}
if ( $fieldDescription->mIsList || 
$fieldDescription->mType == 'Coordinates' ) {
-   $tableFieldValuesForCheck[$fieldName . 
'__full'] = $tableFieldValues[$fieldName];
+   $quotedFieldName = $cdb->addIdentifierQuotes( 
$fieldName . '__full' );
} else {
-   $tableFieldValuesForCheck[$fieldName] = 
$tableFieldValues[$fieldName];
+   $quotedFieldName = $cdb->addIdentifierQuotes( 
$fieldName );
}
+   $tableFieldValuesForCheck[$quotedFieldName] = 
$tableFieldValues[$fieldName];
}
$res = $cdb->select( $tableName, 'COUNT(*)', 
$tableFieldValuesForCheck );
$row = $cdb->fetchRow( $res );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iab2b2bc1207c60c9fc10a198994a18f592998e3d
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Cargo
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren 
Gerrit-Reviewer: Yaron Koren 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Cargo[master]: Fix for bcadef37f8d7 - added quoting of field names

2017-11-14 Thread Yaron Koren (Code Review)
Yaron Koren has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/391471 )

Change subject: Fix for bcadef37f8d7 - added quoting of field names
..

Fix for bcadef37f8d7 - added quoting of field names

Change-Id: Iab2b2bc1207c60c9fc10a198994a18f592998e3d
---
M includes/parserfunctions/CargoStore.php
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cargo 
refs/changes/71/391471/2

diff --git a/includes/parserfunctions/CargoStore.php 
b/includes/parserfunctions/CargoStore.php
index 6dd0932..78c1b4f 100644
--- a/includes/parserfunctions/CargoStore.php
+++ b/includes/parserfunctions/CargoStore.php
@@ -301,10 +301,11 @@
continue;
}
if ( $fieldDescription->mIsList || 
$fieldDescription->mType == 'Coordinates' ) {
-   $tableFieldValuesForCheck[$fieldName . 
'__full'] = $tableFieldValues[$fieldName];
+   $quotedFieldName = $cdb->addIdentifierQuotes( 
$fieldName . '__full' );
} else {
-   $tableFieldValuesForCheck[$fieldName] = 
$tableFieldValues[$fieldName];
+   $quotedFieldName = $cdb->addIdentifierQuotes( 
$fieldName );
}
+   $tableFieldValuesForCheck[$quotedFieldName] = 
$tableFieldValues[$fieldName];
}
$res = $cdb->select( $tableName, 'COUNT(*)', 
$tableFieldValuesForCheck );
$row = $cdb->fetchRow( $res );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iab2b2bc1207c60c9fc10a198994a18f592998e3d
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Cargo
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren 

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