Yaron Koren has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/316625

Change subject: Small fixes
......................................................................

Small fixes

Change-Id: If34b68a17eb32ebcf8e88b899eea8fa7a8f6bd9c
---
M CargoQueryDisplayer.php
M CargoUtils.php
M maintenance/setCargoPageData.php
3 files changed, 3 insertions(+), 4 deletions(-)


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

diff --git a/CargoQueryDisplayer.php b/CargoQueryDisplayer.php
index 06e0c31..4572a10 100644
--- a/CargoQueryDisplayer.php
+++ b/CargoQueryDisplayer.php
@@ -144,7 +144,7 @@
                                        // cool, but those are apparently far
                                        // from universal symbols.
                                        $text = ( $value == true ) ? wfMessage( 
'htmlform-yes' )->text() : wfMessage( 'htmlform-no' )->text();
-                               } elseif ( $fieldType == 'Searchtext' && 
array_key_exists( $fieldName, $this->mSQLQuery->mSearchTerms ) ) {
+                               } elseif ( $fieldType == 'Searchtext' && 
$this->mSQLQuery && array_key_exists( $fieldName, 
$this->mSQLQuery->mSearchTerms ) ) {
                                        $searchTerms = 
$this->mSQLQuery->mSearchTerms[$fieldName];
                                        $text = Html::rawElement( 'span', 
array( 'class' => 'searchresult' ), self::getTextSnippet( $value, $searchTerms 
) );
                                } else {
diff --git a/CargoUtils.php b/CargoUtils.php
index a3eaa83..8d9076a 100644
--- a/CargoUtils.php
+++ b/CargoUtils.php
@@ -579,9 +579,8 @@
                                $createSQL .= ', ' . $cdb->addIdentifierQuotes( 
$fieldName . '__lon' ) . ' ';
                                $createSQL .= $floatTypeString;
                        } elseif ( $fieldType == 'Date' || $fieldType == 
'Datetime' ) {
-                               $integerTypeString = self::fieldTypeToSQLType( 
'Integer', $dbType );
                                $createSQL .= ", " . $cdb->addIdentifierQuotes( 
$fieldName . '__precision' ) . ' ';
-                               $createSQL .= $integerTypeString;
+                               $createSQL .= $intTypeString;
                        } elseif ( $fieldType == 'Searchtext' ) {
                                $createSQL .= ", FULLTEXT KEY $fieldName (" . 
$cdb->addIdentifierQuotes( $fieldName ) . ')';
                                $containsSearchTextType = true;
diff --git a/maintenance/setCargoPageData.php b/maintenance/setCargoPageData.php
index eebf5b3..8d57508 100644
--- a/maintenance/setCargoPageData.php
+++ b/maintenance/setCargoPageData.php
@@ -35,7 +35,7 @@
        public function __construct() {
                parent::__construct();
 
-               $this->mDescription = "Stores a set of data each page in the 
wiki in one or more database tables, for use within Cargo queries.";
+               $this->mDescription = "Stores a set of data for each page in 
the wiki in one or more database tables, for use within Cargo queries.";
 
                $this->addOption( "delete", "Delete the page data DB table(s)", 
false, false );
        }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If34b68a17eb32ebcf8e88b899eea8fa7a8f6bd9c
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Cargo
Gerrit-Branch: master
Gerrit-Owner: 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