Yaron Koren has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/373625 )
Change subject: Cosmetic changes
......................................................................
Cosmetic changes
Change-Id: I6633ec27703beaba3d2f85a62a4bd367310ecca6
---
M Cargo.hooks.php
M CargoSQLQuery.php
M CargoUtils.php
M parserfunctions/CargoQuery.php
4 files changed, 15 insertions(+), 11 deletions(-)
Approvals:
Yaron Koren: Looks good to me, approved
jenkins-bot: Verified
diff --git a/Cargo.hooks.php b/Cargo.hooks.php
index 5a27396..3730338 100755
--- a/Cargo.hooks.php
+++ b/Cargo.hooks.php
@@ -288,7 +288,7 @@
array( '_pageID' => $oldid )
);
}
-
+
// Update the page title in the "general data" tables.
$generalTables = array( '_pageData', '_fileData' );
foreach ( $generalTables as $generalTable ) {
diff --git a/CargoSQLQuery.php b/CargoSQLQuery.php
index cf514f2..e56a7ad 100644
--- a/CargoSQLQuery.php
+++ b/CargoSQLQuery.php
@@ -709,25 +709,29 @@
$this->mWhereStr,
$patternRoot[$i] .
'HOLDS\s+NOT\s+LIKE' . $patternSuffix,
"$replacementFieldName NOT LIKE
",
- $fieldReplaced);
+ $fieldReplaced
+ );
$this->substVirtualFieldName(
$this->mWhereStr,
$patternRoot[$i] .
'HOLDS\s+LIKE' . $patternSuffix,
"$replacementFieldName LIKE ",
- $fieldReplaced);
+ $fieldReplaced
+ );
$this->substVirtualFieldName(
$this->mWhereStr,
$patternRoot[$i] .
'HOLDS\s+NOT' . $patternSuffix,
"$replacementFieldName!=",
- $fieldReplaced);
+ $fieldReplaced
+ );
$this->substVirtualFieldName(
$this->mWhereStr,
$patternRoot[$i] . 'HOLDS' .
$patternSuffix,
"$replacementFieldName=",
- $fieldReplaced);
+ $fieldReplaced
+ );
if ( preg_match( $patternSimple[$i],
$this->mWhereStr ) ) {
if ( $isHierarchy ) {
@@ -1120,7 +1124,7 @@
throw new MWException( "Error: Please
specify a value for \"HOLDS WITHIN\"");
}
$withinValue = $matches[3];
- $subquery = "( SELECT _value FROM
$hierarchyTable WHERE " .
+ $subquery = "( SELECT _value FROM
$hierarchyTable WHERE " .
"_left >= ( SELECT _left FROM
$hierarchyTable WHERE _value = $withinValue ) AND " .
"_right <= ( SELECT _right FROM
$hierarchyTable WHERE _value = $withinValue ) " .
")";
@@ -1138,7 +1142,7 @@
throw new MWException( "Error: Please
specify a value for \"WITHIN\"");
}
$withinValue = $matches[3];
- $subquery = "( SELECT _value FROM
$hierarchyTable WHERE " .
+ $subquery = "( SELECT _value FROM
$hierarchyTable WHERE " .
"_left >= ( SELECT _left FROM
$hierarchyTable WHERE _value = $withinValue ) AND " .
"_right <= ( SELECT _right FROM
$hierarchyTable WHERE _value = $withinValue ) " .
")";
diff --git a/CargoUtils.php b/CargoUtils.php
index 51588fd..a793dd1 100644
--- a/CargoUtils.php
+++ b/CargoUtils.php
@@ -684,8 +684,8 @@
// Now also create tables for each of the 'list' fields,
// if there are any.
- $fieldTableNames = array(); // Store table names of tables
that store data regarding pages
- $fieldHelperTableNames = array(); // Store table names of
tables that store meta data regarding template or fields
+ $fieldTableNames = array(); // Names of tables that store data
regarding pages
+ $fieldHelperTableNames = array(); // Names of tables that store
metadata regarding template or fields
foreach ( $tableSchema->mFieldDescriptions as $fieldName =>
$fieldDescription ) {
if ( $fieldDescription->mIsList ) {
// The double underscore in this table name
should
diff --git a/parserfunctions/CargoQuery.php b/parserfunctions/CargoQuery.php
index 68556df..28ecd13 100644
--- a/parserfunctions/CargoQuery.php
+++ b/parserfunctions/CargoQuery.php
@@ -103,13 +103,13 @@
// fields in the query, making the first 'Query
// necessary. There has to be some better way, though.
$sqlQuery = CargoSQLQuery::newFromValues( $tablesStr,
$fieldsStr, $whereStr, $joinOnStr,
- $groupByStr, $havingStr, $orderByStr,
$limitStr );
+ $groupByStr, $havingStr, $orderByStr, $limitStr
);
$text = $formatter->queryAndDisplay( array( $sqlQuery
), $displayParams );
return $parser->insertStripItem( $text,
$parser->mStripState );
}
// If the query limit was set to 0, no need to run the query -
- // all we need to do is show the "more results" link, then
exit.
+ // all we need to do is show the "more results" link, then exit.
if ( $sqlQuery->mQueryLimit == 0 ) {
$text = $queryDisplayer->viewMoreResultsLink( true );
return $parser->insertStripItem( $text,
$parser->mStripState );
--
To view, visit https://gerrit.wikimedia.org/r/373625
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I6633ec27703beaba3d2f85a62a4bd367310ecca6
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Cargo
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren <[email protected]>
Gerrit-Reviewer: Yaron Koren <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits