Aude has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/357751 )
Change subject: Update Wikidata - fix warning in MwTimeIsoFormatter
......................................................................
Update Wikidata - fix warning in MwTimeIsoFormatter
Change-Id: Ic48b18efc85cfcadb0bc46eefa97aea12b7959c5
---
M composer.json
M composer.lock
M extensions/Wikibase/lib/includes/Formatters/MwTimeIsoFormatter.php
M extensions/Wikibase/lib/tests/phpunit/Formatters/MwTimeIsoFormatterTest.php
M vendor/composer/installed.json
5 files changed, 64 insertions(+), 25 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikidata
refs/changes/51/357751/1
diff --git a/composer.json b/composer.json
index f463389..0721f93 100644
--- a/composer.json
+++ b/composer.json
@@ -30,6 +30,10 @@
{
"type": "git",
"url":
"https://gerrit.wikimedia.org/r/mediawiki/extensions/WikibaseMediaInfo"
+ },
+ {
+ "type": "git",
+ "url":
"https://gerrit.wikimedia.org/r/mediawiki/extensions/Wikibase"
}
],
"require": {
@@ -70,4 +74,4 @@
"merge-dev": false
}
}
-}
\ No newline at end of file
+}
diff --git a/composer.lock b/composer.lock
index 05313a5..7a6b5ff 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at
https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
- "content-hash": "5c451e9e3fa060de04f4cc2263ebd682",
+ "content-hash": "3064c3cdaaf148104ce742f361a9bb03",
"packages": [
{
"name": "composer/installers",
@@ -1473,14 +1473,8 @@
"version": "dev-wmf/1.30.0-wmf.4",
"source": {
"type": "git",
- "url":
"https://github.com/wikimedia/mediawiki-extensions-Wikibase.git",
- "reference": "764893cc86283b0d8d90dac3d3973d3299be8de9"
- },
- "dist": {
- "type": "zip",
- "url":
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/764893cc86283b0d8d90dac3d3973d3299be8de9",
- "reference": "764893cc86283b0d8d90dac3d3973d3299be8de9",
- "shasum": ""
+ "url":
"https://gerrit.wikimedia.org/r/mediawiki/extensions/Wikibase",
+ "reference": "5d7b5008719039907d17381a80852e77a038c1fd"
},
"require": {
"data-values/common": "^0.3.0",
@@ -1537,7 +1531,22 @@
"Wikibase\\View\\Tests\\": "view/tests/phpunit"
}
},
- "notification-url": "https://packagist.org/downloads/",
+ "scripts": {
+ "fix": [
+ "phpcbf"
+ ],
+ "test": [
+ "@validate --no-interaction",
+ "parallel-lint . --exclude vendor",
+ "@cs"
+ ],
+ "cs": [
+ "@phpcs"
+ ],
+ "phpcs": [
+ "phpcs -p -s"
+ ]
+ },
"license": [
"GPL-2.0+"
],
@@ -1555,7 +1564,11 @@
"wikibaserepo",
"wikidata"
],
- "time": "2017-06-07T00:44:15+00:00"
+ "support": {
+ "issues": "https://phabricator.wikimedia.org/",
+ "irc": "irc://irc.freenode.net/wikidata"
+ },
+ "time": "2017-06-08 01:32:05"
},
{
"name": "wikibase/wikimedia-badges",
diff --git a/extensions/Wikibase/lib/includes/Formatters/MwTimeIsoFormatter.php
b/extensions/Wikibase/lib/includes/Formatters/MwTimeIsoFormatter.php
index cf0127d..9835595 100644
--- a/extensions/Wikibase/lib/includes/Formatters/MwTimeIsoFormatter.php
+++ b/extensions/Wikibase/lib/includes/Formatters/MwTimeIsoFormatter.php
@@ -105,8 +105,9 @@
*/
private function getDateFormat( $precision ) {
$datePreference = 'dmy';
+ $datePreferences = $this->language->getDatePreferences();
- if ( !in_array( $datePreference,
$this->language->getDatePreferences() ) ) {
+ if ( $datePreferences === false || !in_array( $datePreference,
$datePreferences ) ) {
$datePreference = 'default';
}
diff --git
a/extensions/Wikibase/lib/tests/phpunit/Formatters/MwTimeIsoFormatterTest.php
b/extensions/Wikibase/lib/tests/phpunit/Formatters/MwTimeIsoFormatterTest.php
index 35107df..dd4c40f 100644
---
a/extensions/Wikibase/lib/tests/phpunit/Formatters/MwTimeIsoFormatterTest.php
+++
b/extensions/Wikibase/lib/tests/phpunit/Formatters/MwTimeIsoFormatterTest.php
@@ -514,6 +514,13 @@
'10000000',
'de'
),
+
+ // Spanish has no date preferences
+ array(
+ '+2017-01-16T00:00:00Z',
TimeValue::PRECISION_DAY,
+ '16 ene 2017',
+ 'es'
+ ),
);
$argLists = array();
@@ -536,6 +543,7 @@
'ar', //replaces all numbers and separators
'bo', //replaces only numbers
'de', //switches separators
+ 'es', //no date preferences
'la', //defaults to genitive month names
'or', //replaces all numbers and separators
);
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index 320f586..bcac55c 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -1686,14 +1686,8 @@
"version_normalized": "dev-wmf/1.30.0-wmf.4",
"source": {
"type": "git",
- "url":
"https://github.com/wikimedia/mediawiki-extensions-Wikibase.git",
- "reference": "764893cc86283b0d8d90dac3d3973d3299be8de9"
- },
- "dist": {
- "type": "zip",
- "url":
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/764893cc86283b0d8d90dac3d3973d3299be8de9",
- "reference": "764893cc86283b0d8d90dac3d3973d3299be8de9",
- "shasum": ""
+ "url":
"https://gerrit.wikimedia.org/r/mediawiki/extensions/Wikibase",
+ "reference": "5d7b5008719039907d17381a80852e77a038c1fd"
},
"require": {
"data-values/common": "^0.3.0",
@@ -1725,9 +1719,9 @@
"jakub-onderka/php-parallel-lint": ">=0.3 <0.10",
"wikibase/wikibase-codesniffer": "^0.1.0"
},
- "time": "2017-06-07T00:44:15+00:00",
+ "time": "2017-06-08T00:28:15+00:00",
"type": "mediawiki-extension",
- "installation-source": "dist",
+ "installation-source": "source",
"autoload": {
"classmap": [
"client/WikibaseClient.hooks.php",
@@ -1752,7 +1746,22 @@
"Wikibase\\View\\Tests\\": "view/tests/phpunit"
}
},
- "notification-url": "https://packagist.org/downloads/",
+ "scripts": {
+ "fix": [
+ "phpcbf"
+ ],
+ "test": [
+ "@validate --no-interaction",
+ "parallel-lint . --exclude vendor",
+ "@cs"
+ ],
+ "cs": [
+ "@phpcs"
+ ],
+ "phpcs": [
+ "phpcs -p -s"
+ ]
+ },
"license": [
"GPL-2.0+"
],
@@ -1769,6 +1778,10 @@
"wikibaselib",
"wikibaserepo",
"wikidata"
- ]
+ ],
+ "support": {
+ "issues": "https://phabricator.wikimedia.org/",
+ "irc": "irc://irc.freenode.net/wikidata"
+ }
}
]
--
To view, visit https://gerrit.wikimedia.org/r/357751
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic48b18efc85cfcadb0bc46eefa97aea12b7959c5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikidata
Gerrit-Branch: wmf/1.30.0-wmf.4
Gerrit-Owner: Aude <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits