WikidataBuilder has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/349730 )
Change subject: New Wikidata Build - 2017-04-22T10:00:01+0000
......................................................................
New Wikidata Build - 2017-04-22T10:00:01+0000
Change-Id: If9d1e5c96de812e40b7ac4edc277157e5683ed12
---
M composer.lock
M
extensions/ArticlePlaceholder/modules/ext.articleplaceholder.createArticle/ext.articleplaceholder.newArticle.js
M
extensions/ArticlePlaceholder/tests/phpunit/includes/AboutTopicRendererTest.php
M
extensions/ArticlePlaceholder/tests/phpunit/includes/specials/SpecialAboutTopicTest.php
M extensions/Wikibase/client/config/WikibaseClient.default.php
M extensions/Wikibase/client/i18n/bs.json
M extensions/Wikibase/client/i18n/hr.json
M extensions/Wikibase/client/includes/Hooks/EchoNotificationsHandlers.php
M
extensions/Wikibase/client/tests/phpunit/includes/Hooks/EchoNotificationsHandlersTest.php
M extensions/Wikibase/docs/options.wiki
M extensions/Wikibase/lib/includes/Interactors/TermSearchOptions.php
M extensions/Wikibase/lib/includes/Store/Sql/TermSqlIndex.php
M extensions/Wikibase/lib/tests/phpunit/Interactors/TermSearchOptionsTest.php
M extensions/Wikibase/repo/Wikibase.hooks.php
M extensions/Wikibase/repo/i18n/cs.json
M extensions/Wikibase/repo/i18n/de.json
M extensions/Wikibase/repo/i18n/fr.json
M extensions/Wikibase/repo/i18n/he.json
M extensions/Wikibase/repo/i18n/it.json
M extensions/Wikibase/repo/i18n/zh-hans.json
M extensions/Wikibase/repo/includes/Hooks/LinkBeginHookHandler.php
M extensions/Wikibase/repo/includes/Specials/SpecialAvailableBadges.php
M
extensions/Wikibase/repo/tests/phpunit/includes/Dumpers/RdfDumpGeneratorTest.php
M extensions/Wikibase/repo/tests/phpunit/includes/Rdf/NTriplesRdfTestHelper.php
M extensions/Wikibase/repo/tests/phpunit/includes/Rdf/RdfBuilderTestData.php
M extensions/Wikibase/repo/tests/phpunit/includes/RepoHooksTest.php
M
extensions/Wikibase/repo/tests/phpunit/includes/Specials/SpecialEntityDataTest.php
M extensions/WikimediaBadges/.gitignore
M extensions/WikimediaBadges/Gruntfile.js
M extensions/WikimediaBadges/package.json
M vendor/composer/installed.json
31 files changed, 154 insertions(+), 140 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikidata
refs/changes/30/349730/1
diff --git a/composer.lock b/composer.lock
index 4dc048b..64dc03d 100644
--- a/composer.lock
+++ b/composer.lock
@@ -742,12 +742,12 @@
"source": {
"type": "git",
"url":
"https://github.com/wikimedia/mediawiki-extensions-ArticlePlaceholder.git",
- "reference": "29cb26fb03f5fc6c8a801b8530ab47cf4e3c4c9d"
+ "reference": "215675361fdd61d9efc7e546748c3d6db19571b0"
},
"dist": {
"type": "zip",
- "url":
"https://api.github.com/repos/wikimedia/mediawiki-extensions-ArticlePlaceholder/zipball/29cb26fb03f5fc6c8a801b8530ab47cf4e3c4c9d",
- "reference": "29cb26fb03f5fc6c8a801b8530ab47cf4e3c4c9d",
+ "url":
"https://api.github.com/repos/wikimedia/mediawiki-extensions-ArticlePlaceholder/zipball/215675361fdd61d9efc7e546748c3d6db19571b0",
+ "reference": "215675361fdd61d9efc7e546748c3d6db19571b0",
"shasum": ""
},
"require-dev": {
@@ -772,7 +772,7 @@
],
"description": "Provides a special page with Wikibase information
about a certain topic, with invitation to create an article for the topic",
"homepage":
"https://www.mediawiki.org/wiki/Extension:ArticlePlaceholder",
- "time": "2017-04-17 20:38:54"
+ "time": "2017-04-21 14:58:01"
},
{
"name": "propertysuggester/property-suggester",
@@ -1558,12 +1558,12 @@
"source": {
"type": "git",
"url":
"https://github.com/wikimedia/mediawiki-extensions-Wikibase.git",
- "reference": "ac94fbedfff67d4a50bdb9c374e8fb54b3d31d06"
+ "reference": "ba2d42a4b308ae22fb33740316f809cfc01481eb"
},
"dist": {
"type": "zip",
- "url":
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/ac94fbedfff67d4a50bdb9c374e8fb54b3d31d06",
- "reference": "ac94fbedfff67d4a50bdb9c374e8fb54b3d31d06",
+ "url":
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/ba2d42a4b308ae22fb33740316f809cfc01481eb",
+ "reference": "ba2d42a4b308ae22fb33740316f809cfc01481eb",
"shasum": ""
},
"require": {
@@ -1637,7 +1637,7 @@
"wikibaserepo",
"wikidata"
],
- "time": "2017-04-21 06:54:23"
+ "time": "2017-04-21 23:16:58"
},
{
"name": "wikibase/wikimedia-badges",
@@ -1645,7 +1645,7 @@
"source": {
"type": "git",
"url":
"https://gerrit.wikimedia.org/r/mediawiki/extensions/WikimediaBadges",
- "reference": "b35c974c4057c2cd50c67b7bb4b005a7c2ad48ea"
+ "reference": "268b99ce34eaf727d940cf8a5c553f2453872862"
},
"require": {
"php": ">=5.3.0"
@@ -1679,7 +1679,7 @@
"support": {
"irc": "irc://irc.freenode.net/wikidata"
},
- "time": "2017-04-18 08:47:11"
+ "time": "2017-04-21 16:24:06"
},
{
"name": "wikimedia/assert",
diff --git
a/extensions/ArticlePlaceholder/modules/ext.articleplaceholder.createArticle/ext.articleplaceholder.newArticle.js
b/extensions/ArticlePlaceholder/modules/ext.articleplaceholder.createArticle/ext.articleplaceholder.newArticle.js
index 439b30b..5b9eb60 100644
---
a/extensions/ArticlePlaceholder/modules/ext.articleplaceholder.createArticle/ext.articleplaceholder.newArticle.js
+++
b/extensions/ArticlePlaceholder/modules/ext.articleplaceholder.createArticle/ext.articleplaceholder.newArticle.js
@@ -8,7 +8,7 @@
( function ( $, mw, OO, module ) {
'use strict';
- function onWikipageContent() {
+ function init() {
var CreateArticleDialog = mw.config.get( 'apContentTranslation'
) ?
module.exports.CreateArticleTranslationDialog :
module.exports.CreateArticleDialog,
@@ -24,6 +24,6 @@
} );
}
- mw.hook( 'wikipage.content' ).add( onWikipageContent );
+ $( init );
} )( jQuery, mediaWiki, OO, module );
diff --git
a/extensions/ArticlePlaceholder/tests/phpunit/includes/AboutTopicRendererTest.php
b/extensions/ArticlePlaceholder/tests/phpunit/includes/AboutTopicRendererTest.php
index 8a2d1e5..c592a8e 100644
---
a/extensions/ArticlePlaceholder/tests/phpunit/includes/AboutTopicRendererTest.php
+++
b/extensions/ArticlePlaceholder/tests/phpunit/includes/AboutTopicRendererTest.php
@@ -204,9 +204,7 @@
* @return SiteLinkLookup
*/
private function getSiteLinkLookup() {
- $siteLinkLookup = $this->getMockBuilder( SiteLinkLookup::class )
- ->disableOriginalConstructor()
- ->getMock();
+ $siteLinkLookup = $this->getMock( SiteLinkLookup::class );
$siteLinkLookup->expects( $this->any() )
->method( 'getSiteLinksForItem' )
diff --git
a/extensions/ArticlePlaceholder/tests/phpunit/includes/specials/SpecialAboutTopicTest.php
b/extensions/ArticlePlaceholder/tests/phpunit/includes/specials/SpecialAboutTopicTest.php
index ab408ac..06cca06 100644
---
a/extensions/ArticlePlaceholder/tests/phpunit/includes/specials/SpecialAboutTopicTest.php
+++
b/extensions/ArticlePlaceholder/tests/phpunit/includes/specials/SpecialAboutTopicTest.php
@@ -113,29 +113,25 @@
}
private function getSiteLinkLookup() {
- $siteLikLookup = $this->getMockBuilder( SiteLinkLookup::class )
- ->disableOriginalConstructor()
- ->getMock();
+ $siteLinkLookup = $this->getMock( SiteLinkLookup::class );
- $siteLikLookup->expects( $this->any() )
+ $siteLinkLookup->expects( $this->any() )
->method( 'getLinks' )
->with( [ 1234 ], [ 'enwiki' ] )
->will( $this->returnValue( [ [ 'enwiki', 'Beer', 1234
] ] ) );
- return $siteLikLookup;
+ return $siteLinkLookup;
}
private function getEntityIdParser() {
- $siteLikLookup = $this->getMockBuilder( EntityIdParser::class )
- ->disableOriginalConstructor()
- ->getMock();
+ $idParser = $this->getMock( EntityIdParser::class );
- $siteLikLookup->expects( $this->any() )
+ $idParser->expects( $this->any() )
->method( 'parse' )
->with( 'Q1234' )
->will( $this->returnValue( new ItemId( 'Q1234' ) ) );
- return $siteLikLookup;
+ return $idParser;
}
private function getEntityLookup() {
diff --git a/extensions/Wikibase/client/config/WikibaseClient.default.php
b/extensions/Wikibase/client/config/WikibaseClient.default.php
index 3c57f69..25eb5e1 100644
--- a/extensions/Wikibase/client/config/WikibaseClient.default.php
+++ b/extensions/Wikibase/client/config/WikibaseClient.default.php
@@ -26,7 +26,7 @@
'injectRecentChanges' => true,
'showExternalRecentChanges' => true,
'sendEchoNotification' => false,
- 'repoIcon' => false,
+ 'echoIcon' => false,
'allowDataTransclusion' => true,
'propagateChangesToRepo' => true,
'otherProjectsLinksByDefault' => false,
diff --git a/extensions/Wikibase/client/i18n/bs.json
b/extensions/Wikibase/client/i18n/bs.json
index c3a77e4..de30548 100644
--- a/extensions/Wikibase/client/i18n/bs.json
+++ b/extensions/Wikibase/client/i18n/bs.json
@@ -18,9 +18,9 @@
"wikibase-comment-unlink": "Ova stranica je odvojena od stavke sa
Wikipodataka. Jezične veze su uklonjene.",
"wikibase-comment-restore": "Asocirana stavka Wikipodataka je vraćena.
Jezične veze su sada isto vraćene.",
"wikibase-comment-update": "{{WBREPONAME}} promijenjena stavka",
- "wikibase-comment-sitelink-add": "Jezična veza dodana: $1",
+ "wikibase-comment-sitelink-add": "Jezička veza dodana: $1",
"wikibase-comment-sitelink-change": "Jezična veza izmjenjena sa $1 u
$2",
- "wikibase-comment-sitelink-remove": "Jezična veza uklonjena: $1",
+ "wikibase-comment-sitelink-remove": "Jezička veza uklonjena: $1",
"wikibase-comment-multi": "$1 {{PLURAL:$1|izmjena|izmjene}}",
"wikibase-dataitem": "Na Wikipodacima",
"wikibase-editlinks": "Uredi veze",
diff --git a/extensions/Wikibase/client/i18n/hr.json
b/extensions/Wikibase/client/i18n/hr.json
index 2d72084..df91abd 100644
--- a/extensions/Wikibase/client/i18n/hr.json
+++ b/extensions/Wikibase/client/i18n/hr.json
@@ -51,6 +51,11 @@
"wikibase-pageswithbadges-legend": "Popis stranica sa zadanom značkom",
"wikibase-pageswithbadges-badge": "Značka:",
"wikibase-pageswithbadges-submit": "Prikaži stranice",
+ "entityusage": "Uporaba stavke",
+ "entityusage-summary": "Na ovoj stranici mogu se pogledati popisi
stranica koje rabe zadanu stavku (npr. Q224). Popis je poredan padajućim nizom
ID vrijednosti stranice, te su tako novije stranice prikazane na početku
popisa.",
+ "wikibase-entityusage-legend": "Popis stranica koje rabe zadanu stavku",
+ "wikibase-entityusage-entity": "Stavka:",
+ "wikibase-entityusage-submit": "Pokaži stranice",
"wikibase-pageinfo-entity-id": "Oznaka na Wikidati",
"wikibase-pageinfo-entity-id-none": "ništa",
"wikibase-otherprojects": "Na drugim projektima",
diff --git
a/extensions/Wikibase/client/includes/Hooks/EchoNotificationsHandlers.php
b/extensions/Wikibase/client/includes/Hooks/EchoNotificationsHandlers.php
index bfba19b..c193344 100644
--- a/extensions/Wikibase/client/includes/Hooks/EchoNotificationsHandlers.php
+++ b/extensions/Wikibase/client/includes/Hooks/EchoNotificationsHandlers.php
@@ -48,7 +48,7 @@
/**
* @var array|false
*/
- private $repoIcon;
+ private $echoIcon;
/**
* @var string
@@ -59,20 +59,20 @@
* @param RepoLinker $repoLinker
* @param string $siteId
* @param bool $sendEchoNotification
- * @param array|false $repoIcon
+ * @param array|false $echoIcon
* @param string $repoSiteName
*/
public function __construct(
RepoLinker $repoLinker,
$siteId,
$sendEchoNotification,
- $repoIcon,
+ $echoIcon,
$repoSiteName
) {
$this->repoLinker = $repoLinker;
$this->siteId = $siteId;
$this->sendEchoNotification = $sendEchoNotification;
- $this->repoIcon = $repoIcon;
+ $this->echoIcon = $echoIcon;
$this->repoSiteName = $repoSiteName;
}
@@ -87,7 +87,7 @@
$wikibaseClient->newRepoLinker(),
$settings->getSetting( 'siteGlobalID' ),
$settings->getSetting( 'sendEchoNotification' ),
- $settings->getSetting( 'repoIcon' ),
+ $settings->getSetting( 'echoIcon' ),
$settings->getSetting( 'repoSiteName' )
);
}
@@ -142,8 +142,8 @@
'bundle' => [ 'web' => true, 'email' => false ],
];
- if ( !empty( $this->repoIcon ) ) {
- $icons[self::NOTIFICATION_TYPE] = $this->repoIcon;
+ if ( !empty( $this->echoIcon ) ) {
+ $icons[self::NOTIFICATION_TYPE] = $this->echoIcon;
} else {
$icons[self::NOTIFICATION_TYPE] = $icons['placeholder'];
}
diff --git
a/extensions/Wikibase/client/tests/phpunit/includes/Hooks/EchoNotificationsHandlersTest.php
b/extensions/Wikibase/client/tests/phpunit/includes/Hooks/EchoNotificationsHandlersTest.php
index df5633d..c7d28a4 100644
---
a/extensions/Wikibase/client/tests/phpunit/includes/Hooks/EchoNotificationsHandlersTest.php
+++
b/extensions/Wikibase/client/tests/phpunit/includes/Hooks/EchoNotificationsHandlersTest.php
@@ -51,7 +51,7 @@
$this->repoLinker,
$settings->getSetting( 'siteGlobalID' ),
$settings->getSetting( 'sendEchoNotification' ),
- $settings->getSetting( 'repoIcon' ),
+ $settings->getSetting( 'echoIcon' ),
'repoSiteName'
);
}
@@ -63,7 +63,7 @@
$settings = new SettingsArray();
$settings->setSetting( 'siteGlobalID', 'enwiki' );
$settings->setSetting( 'sendEchoNotification', true );
- $settings->setSetting( 'repoIcon', false );
+ $settings->setSetting( 'echoIcon', false );
$handlers = $this->getHandlers( $settings );
@@ -163,7 +163,7 @@
$settings = new SettingsArray();
$settings->setSetting( 'siteGlobalID', 'enwiki' );
$settings->setSetting( 'sendEchoNotification', false );
- $settings->setSetting( 'repoIcon', false );
+ $settings->setSetting( 'echoIcon', false );
$handlers = $this->getHandlers( $settings );
$handlers->doBeforeCreateEchoEvent(
@@ -199,22 +199,22 @@
$this->assertEquals(
$wgEchoNotificationIcons['placeholder'],
$wgEchoNotificationIcons[$handlers::NOTIFICATION_TYPE],
- "Failed asserting that missing repoIcon setting
defaults to Echo's default"
+ "Failed asserting that missing echoIcon setting
defaults to Echo's default"
);
unset( $wgEchoNotifications[$handlers::NOTIFICATION_TYPE] );
unset( $wgEchoNotificationCategories['wikibase-action'] );
unset( $wgEchoNotificationIcons[$handlers::NOTIFICATION_TYPE] );
- $repoIcon = [ 'url' => 'some_url_here' ];
- $settings->setSetting( 'repoIcon', $repoIcon );
+ $echoIcon = [ 'url' => 'some_url_here' ];
+ $settings->setSetting( 'echoIcon', $echoIcon );
$handlers = $this->getHandlers( $settings );
$handlers->doBeforeCreateEchoEvent(
$wgEchoNotifications, $wgEchoNotificationCategories,
$wgEchoNotificationIcons
);
$this->assertEquals(
- $repoIcon,
+ $echoIcon,
$wgEchoNotificationIcons[$handlers::NOTIFICATION_TYPE],
"Failed asserting that the notification icon is
correctly registered to Echo"
);
diff --git a/extensions/Wikibase/docs/options.wiki
b/extensions/Wikibase/docs/options.wiki
index 6e5d59a..78a70cd 100644
--- a/extensions/Wikibase/docs/options.wiki
+++ b/extensions/Wikibase/docs/options.wiki
@@ -103,7 +103,7 @@
;injectRecentChanges: Whether changes on the repository should be injected
into this wiki's recent changes table, so they show up on watchlists, etc.
Requires the <code>dispatchChanges.php</code> script to run, and this wiki to
be listed in the <code>localClientDatabases</code> setting on the repository.
;showExternalRecentChanges: Whether changes on the repository should be
displayed on Special:RecentChanges, Special:Watchlist, etc on the client wiki.
In contrast to <code>injectRecentChanges</code>, this setting just removes the
changes from the user interface. The default is <code>false</code>. This is
intended to temporarily prevent external changes from showing in order to find
or fix some issue on a live site.
;sendEchoNotification: If true, allows users on the client wiki to get a
notification when a page they created is connected to a repo item. This
requires the Echo extension.
-;repoIcon: If <code>sendEchoNotification</code> is set to <code>true</code>,
you can also provide what icon the user will see. The correct syntax is
<code>array( 'url' => '...' )</code> or <code>array( 'path' => '...' )</code>
where <code>path</code> is relative to <code>$wgExtensionAssetsPath</code>.
Defaults to <code>false</code> which means that there will be the default Echo
icon.
+;echoIcon: If <code>sendEchoNotification</code> is set to <code>true</code>,
you can also provide what icon the user will see. The correct syntax is <code>[
'url' => '...' ]</code> or <code>[ 'path' => '...' ]</code> where
<code>path</code> is relative to <code>$wgExtensionAssetsPath</code>. Defaults
to <code>false</code> which means that there will be the default Echo icon.
=== Pseudo-configuration ===
Settings mentioned in this section are not really configuration. They are used
to pass definitions of services to service locators. Wiring files should
generally not be replaced with other files, neither should be their content
(PHP code) editted by users, as the usual configuration.
diff --git a/extensions/Wikibase/lib/includes/Interactors/TermSearchOptions.php
b/extensions/Wikibase/lib/includes/Interactors/TermSearchOptions.php
index 0cc0236..5bfd867 100644
--- a/extensions/Wikibase/lib/includes/Interactors/TermSearchOptions.php
+++ b/extensions/Wikibase/lib/includes/Interactors/TermSearchOptions.php
@@ -11,7 +11,7 @@
*/
class TermSearchOptions {
- const HARD_LIMIT = 5000;
+ const HARD_LIMIT = 2500;
/**
* @var bool do a case sensitive search
@@ -62,7 +62,7 @@
}
/**
- * @param int $limit Hard upper limit of 5000
+ * @param int $limit Hard upper limit of 2500
*/
public function setLimit( $limit ) {
Assert::parameterType( 'integer', $limit, '$limit' );
diff --git a/extensions/Wikibase/lib/includes/Store/Sql/TermSqlIndex.php
b/extensions/Wikibase/lib/includes/Store/Sql/TermSqlIndex.php
index 32e8f6a..fc80b5a 100644
--- a/extensions/Wikibase/lib/includes/Store/Sql/TermSqlIndex.php
+++ b/extensions/Wikibase/lib/includes/Store/Sql/TermSqlIndex.php
@@ -220,7 +220,6 @@
public function getEntityTerms( EntityDocument $entity ) {
$id = $entity->getId();
$this->assertEntityIdFromRightRepository( $id );
- $this->assertIsNumericEntityId( $id );
$terms = [];
@@ -309,9 +308,9 @@
// That would allow us to do the deletion in a single
query, based on a set of ids.
$this->assertIsNumericEntityId( $entityId );
+ /** @var EntityId|Int32EntityId $entityId */
$entityIdentifiers = array(
- // FIXME: this will fail for IDs that do not have a
numeric form
'term_entity_id' => $entityId->getNumericId(),
'term_entity_type' => $entityId->getEntityType()
);
@@ -395,13 +394,13 @@
public function deleteTermsOfEntity( EntityId $entityId ) {
$this->assertEntityIdFromRightRepository( $entityId );
$this->assertIsNumericEntityId( $entityId );
+ /** @var EntityId|Int32EntityId $entityId */
$dbw = $this->getConnection( DB_MASTER );
$success = $dbw->delete(
$this->tableName,
array(
- // FIXME: this will fail for IDs that do not
have a numeric form
'term_entity_id' => $entityId->getNumericId(),
'term_entity_type' => $entityId->getEntityType()
),
@@ -478,11 +477,8 @@
array $termTypes = null,
array $languageCodes = null
) {
- if ( empty( $entityIds )
- || ( is_array( $termTypes ) && empty( $termTypes ) )
- || ( is_array( $languageCodes ) && empty(
$languageCodes ) )
- ) {
- return array();
+ if ( $entityIds === [] || $termTypes === [] || $languageCodes
=== [] ) {
+ return [];
}
$entityType = null;
@@ -496,8 +492,7 @@
}
$this->assertIsNumericEntityId( $id );
-
- // FIXME: this will fail for IDs that do not have a
numeric form
+ /** @var Int32EntityId $id */
$numericIds[] = $id->getNumericId();
}
@@ -610,7 +605,7 @@
* @param string|string[]|null $termType
* @param string|string[]|null $entityType
* @param array $options
- * In this implementation at most 5000 terms will be
retreived.
+ * In this implementation at most 2500 terms will be
retreived.
* As we only return a single TermIndexEntry per Entity the
return count may be lower.
*
* @return TermIndexEntry[]
@@ -625,7 +620,7 @@
if ( array_key_exists( 'LIMIT', $options ) ) {
$requestedLimit = $options['LIMIT'];
}
- $options['LIMIT'] = 5000;
+ $options['LIMIT'] = 2500;
$options['orderByWeight'] = true;
$matchingTermIndexEntries = $this->getMatchingTerms(
@@ -674,7 +669,7 @@
// this is a post-search sorting by weight. This allows us to
not require an additional
// index on the wb_terms table that is very big already. This
is also why we have
- // the internal limit of 5000, since SQL's index would explode
in size if we added the
+ // the internal limit of 2500, since SQL's index would explode
in size if we added the
// weight to it here (which would allow us to delegate the
sorting to SQL itself)
uasort( $sortData, function( $a, $b ) {
if ( $a['weight'] === $b['weight'] ) {
diff --git
a/extensions/Wikibase/lib/tests/phpunit/Interactors/TermSearchOptionsTest.php
b/extensions/Wikibase/lib/tests/phpunit/Interactors/TermSearchOptionsTest.php
index 20e3975..92fb391 100644
---
a/extensions/Wikibase/lib/tests/phpunit/Interactors/TermSearchOptionsTest.php
+++
b/extensions/Wikibase/lib/tests/phpunit/Interactors/TermSearchOptionsTest.php
@@ -19,8 +19,8 @@
public function provideLimitInputAndExpected() {
return array(
array( 1, 1 ),
- array( 5000, 5000 ),
- array( 999999, 5000 ),
+ array( 2500, 2500 ),
+ array( 999999, 2500 ),
);
}
diff --git a/extensions/Wikibase/repo/Wikibase.hooks.php
b/extensions/Wikibase/repo/Wikibase.hooks.php
index 280325a..ff4fb34 100644
--- a/extensions/Wikibase/repo/Wikibase.hooks.php
+++ b/extensions/Wikibase/repo/Wikibase.hooks.php
@@ -850,8 +850,8 @@
}
/**
- * Adds a list of data value types, sparql endpoint and concept base
URI to
- * the action=query&meta=siteinfo API.
+ * Exposes configuration values to the action=query&meta=siteinfo API,
including lists of
+ * property and data value types, sparql endpoint, and several base
URLs and URIs.
*
* @param ApiQuerySiteinfo $api
* @param array &$data
@@ -870,6 +870,9 @@
$conceptBaseUri = $wikibaseRepo->getSettings()->getSetting(
'conceptBaseUri' );
$data['wikibase-conceptbaseuri'] = $conceptBaseUri;
+ $geoShapeStorageBaseUrl =
$wikibaseRepo->getSettings()->getSetting( 'geoShapeStorageFrontendUrl' );
+ $data['wikibase-geoshapestoragebaseurl'] =
$geoShapeStorageBaseUrl;
+
$sparqlEndpoint = $wikibaseRepo->getSettings()->getSetting(
'sparqlEndpoint' );
if ( is_string( $sparqlEndpoint ) ) {
$data['wikibase-sparql'] = $sparqlEndpoint;
diff --git a/extensions/Wikibase/repo/i18n/cs.json
b/extensions/Wikibase/repo/i18n/cs.json
index be60021..01bcf10 100644
--- a/extensions/Wikibase/repo/i18n/cs.json
+++ b/extensions/Wikibase/repo/i18n/cs.json
@@ -147,6 +147,8 @@
"wikibase-wikibaserepopage-invalid-id": "Systém nezná zadané ID „$1“.
Prosím, zadejte platné ID entity.",
"wikibase-wikibaserepopage-unresolved-redirect": "$1 je přesměrování.",
"wikibase-wikibaserepopage-storage-exception": "Při pokusu o načtení $1
se objevila chyba: $2",
+ "special-availablebadges": "Dostupné odznaky",
+ "wikibase-availablebadges-emptylist": "Na této wiki nejsou nastaveny
žádné odznaky.",
"special-itembytitle": "Položky podle názvu",
"wikibase-itembytitle-lookup-fieldset": "Vyhledat položky podle
projektu a názvu",
"wikibase-itembytitle-lookup-site": "Projekt:",
@@ -300,7 +302,7 @@
"wikibase-entitydata-unsupported-format": "Toto rozhraní nepodporuje
datový formát $1.",
"wikibase-entitydata-storage-error": "Nepodařilo se načíst entitu $1.",
"wikibase-entitydata-title": "Data entity",
- "wikibase-entitydata-text": "Tato stránka poskytuje odkazovací datové
rozhraní k hodnotám entit. Uveďte ID entity v URL použitím syntaxe pro
podstránky.\n* Použije se vyjednávání o obsahu podle hlavičky Accept vašeho
klienta. To znamená, že data entity budou poskytnuta ve formátu preferovaném
vaším klientem. U webového prohlížeče to bude HTML, takže bude váš prohlížeč
přesměrován na běžnou stránku entity.\n* Výslovně si můžete konkrétní datový
formát vyžádat uvedením příslušné přípony souboru k ID entity: Q23.json vrátí
data ve formátu JSON, Q23.ttl vrátí RDF/Turtle atd.",
+ "wikibase-entitydata-text": "Tato stránka poskytuje odkazovací datové
rozhraní k hodnotám entit. Uveďte ID entity v URL použitím syntaxe pro
podstránky.\n* Použije se vyjednávání o obsahu podle hlavičky Accept vašeho
klienta. To znamená, že data entity budou poskytnuta ve formátu preferovaném
vaším klientem. U webového prohlížeče to bude HTML, takže bude váš prohlížeč
přesměrován na běžnou stránku entity.\n* Výslovně si můžete konkrétní datový
formát vyžádat uvedením příslušné přípony souboru k ID entity: Q23.json vrátí
data ve formátu JSON, Q23.ttl vrátí RDF/Turtle atd. Podporované formáty jsou:
$1.",
"special-redirectentity": "Přesměrovat entitu",
"wikibase-redirectentity-success": "$1 bylo přesměrováno na $2.",
"wikibase-redirectentity-fromid": "ID odkud přesměrovat",
diff --git a/extensions/Wikibase/repo/i18n/de.json
b/extensions/Wikibase/repo/i18n/de.json
index caf78b0..d42e5df 100644
--- a/extensions/Wikibase/repo/i18n/de.json
+++ b/extensions/Wikibase/repo/i18n/de.json
@@ -311,7 +311,7 @@
"wikibase-entitydata-unsupported-format": "Das Datenformat $1 wird von
dieser Schnittstelle nicht unterstützt.",
"wikibase-entitydata-storage-error": "Das Objekt $1 konnte nicht
geladen werden.",
"wikibase-entitydata-title": "Objektdaten",
- "wikibase-entitydata-text": "Diese Seite liefert eine verlinkte
Datenschnittstelle zu Objektwerten. Bitte gib die Objektkennung in der URL an,
indem du Unterseitensyntax verwendest.\n* Inhaltsvereinbarungsanfragen
basierend auf deinem Client-Accept-Header. Das bedeutet, dass die Objektdaten
im Format angegeben wird, das von deinem Client bevorzugt wird. Für einen
Webbrowser wird dies HTML sein, was bewirkt, dass dein Browser zur normalen
Objektseite weiterleitet.\n* Du kannst ein spezielles Datenformat ausdrücklich
durch das Hinzufügen der passenden Dateierweiterung zur Objektkennung
anfordern: Q23.json gibt Daten im JSON-Format zurück, Q23.ttl gibt RDF/Turtle
zurück und so weiter.",
+ "wikibase-entitydata-text": "Diese Seite liefert eine verlinkte
Datenschnittstelle zu Objektwerten. Bitte gib die Objektkennung in der URL an,
indem du Unterseitensyntax verwendest.\n* Inhaltsvereinbarungsanfragen
basierend auf deinem Client-Accept-Header. Das bedeutet, dass die Objektdaten
im Format angegeben wird, das von deinem Client bevorzugt wird. Für einen
Webbrowser wird dies HTML sein, was bewirkt, dass dein Browser zur normalen
Objektseite weiterleitet.\n* Du kannst ein spezielles Datenformat ausdrücklich
durch das Hinzufügen der passenden Dateierweiterung zur Objektkennung
anfordern: Q23.json gibt Daten im JSON-Format zurück, Q23.ttl gibt RDF/Turtle
zurück und so weiter. Die unterstützten Formate sind: $1.",
"special-entitypage": "Objektseite",
"wikibase-entitypage-title": "Objektseite",
"wikibase-entitypage-text": "Diese Seite leitet auf die Objektseite auf
dem Repositorium weiter, zu der sie gehört. Bitte gib mithilfe der
Unterseitensyntax die Objektkennung in der URL an.",
diff --git a/extensions/Wikibase/repo/i18n/fr.json
b/extensions/Wikibase/repo/i18n/fr.json
index f906a19..fccebe0 100644
--- a/extensions/Wikibase/repo/i18n/fr.json
+++ b/extensions/Wikibase/repo/i18n/fr.json
@@ -182,6 +182,8 @@
"wikibase-wikibaserepopage-invalid-id": "L’identifiant « $1 »
est inconnu du système. Veuillez utiliser un identifiant d’entité valide.",
"wikibase-wikibaserepopage-unresolved-redirect": "$1 est une
redirection.",
"wikibase-wikibaserepopage-storage-exception": "Une erreur s’est
produite lors d’un essai de chargement de $1 : $2.",
+ "special-availablebadges": "Insignes disponibles",
+ "wikibase-availablebadges-emptylist": "Il n’y a pas d’insignes
configurés sur ce wiki.",
"special-itembytitle": "Élément par titre",
"wikibase-itembytitle-lookup-fieldset": "Rechercher des éléments par
site et par titre",
"wikibase-itembytitle-lookup-site": "Site : ",
diff --git a/extensions/Wikibase/repo/i18n/he.json
b/extensions/Wikibase/repo/i18n/he.json
index 1aa11a8..528d7e3 100644
--- a/extensions/Wikibase/repo/i18n/he.json
+++ b/extensions/Wikibase/repo/i18n/he.json
@@ -298,7 +298,7 @@
"wikibase-entitydata-unsupported-format": "תסדיר $1 אינו נתמך בממשק
הזה.",
"wikibase-entitydata-storage-error": "שגיאה בטעינת הישות $1.",
"wikibase-entitydata-title": "נתוני ישות",
- "wikibase-entitydata-text": "הדף הזה מספק ממשק נתונים מקושר לערכי
ישויות. נא לספר את מזהה הישות בכתובת URL באמצעות תחביר דפי־משנה.\n* משא ומתן על
תוכן חל לפי כותרת Accept של הלקוח שלך. זה אומר שנתוני הישות יסופקו בתסדיר
המועדף על הלקוח שלך. לדפדפן וב זה יהיה HTML, וזה יגרום לדפדפן שלך להיות מופנה
לדף ישות רגיל.\n* יש לך אפשרות לבקש תסדיר נתונים מסוים באמצעות הוספת סיומת קובץ
מתאימה למזהה הישרות: השם Q23.json יחזיר את הנתונים בתסדיר JSON, השם Q23.ttl
יחזיר RDF/Turtke וכו'.",
+ "wikibase-entitydata-text": "הדף הזה מספק ממשק נתונים מקושר לערכי
ישויות. נא לספר את מזהה הישות בכתובת URL באמצעות תחביר דפי־משנה.\n* משא ומתן על
תוכן חל לפי כותרת Accept של הלקוח שלך. זה אומר שנתוני הישות יסופקו בתסדיר
המועדף על הלקוח שלך. לדפדפן וב זה יהיה HTML, וזה יגרום לדפדפן שלך להיות מופנה
לדף ישות רגיל.\n* יש לך אפשרות לבקש תסדיר נתונים מסוים באמצעות הוספת סיומת קובץ
מתאימה למזהה הישרות: השם Q23.json יחזיר את הנתונים בתסדיר JSON, השם Q23.ttl
יחזיר RDF/Turtke וכו'. התסדירים הנתמכים הם: $1",
"special-entitypage": "דף ישות",
"wikibase-entitypage-title": "דף ישות",
"wikibase-entitypage-text": "הדף הזה מפנה לדף הישות במאגר שהוא שייך
אליו. נא לספק את מזהה הישות ב־URL, באמצעות תחביר דף־משנה.",
diff --git a/extensions/Wikibase/repo/i18n/it.json
b/extensions/Wikibase/repo/i18n/it.json
index 57ddf2e..3b148ff 100644
--- a/extensions/Wikibase/repo/i18n/it.json
+++ b/extensions/Wikibase/repo/i18n/it.json
@@ -144,6 +144,8 @@
"wikibase-wikibaserepopage-invalid-id": "L'ID \"$1\" è sconosciuto al
sistema. Utilizza un ID di entità valido.",
"wikibase-wikibaserepopage-unresolved-redirect": "$1 è un redirect.",
"wikibase-wikibaserepopage-storage-exception": "Si è verificato un
errore durante il caricamento di $1: $2.",
+ "special-availablebadges": "Distintivi disponibili",
+ "wikibase-availablebadges-emptylist": "Non ci sono distintivi
configurati su questo wiki.",
"special-itembytitle": "Elementi per titolo",
"wikibase-itembytitle-lookup-fieldset": "Ricerca elementi per sito e
titolo",
"wikibase-itembytitle-lookup-site": "Sito:",
@@ -283,7 +285,6 @@
"wikibase-entitieswithoutlabel-legend": "Permette di ottenere l'elenco
delle entità senza etichetta",
"wikibase-entitieswithoutlabel-label-language": "Codice lingua:",
"wikibase-entitieswithoutlabel-label-type": "Tipo:",
- "wikibase-entitieswithoutlabel-label-alltypes": "tutti",
"wikibase-entitieswithoutlabel-submit": "Trova",
"wikibase-entitieswithoutlabel-invalid-language": "\"$1\" non è un
codice di lingua valido.",
"wikibase-entitieswithoutlabel-invalid-type": "\"$1\" non è un tipo di
entità valido.",
diff --git a/extensions/Wikibase/repo/i18n/zh-hans.json
b/extensions/Wikibase/repo/i18n/zh-hans.json
index c7442a5..ba87015 100644
--- a/extensions/Wikibase/repo/i18n/zh-hans.json
+++ b/extensions/Wikibase/repo/i18n/zh-hans.json
@@ -158,6 +158,8 @@
"wikibase-wikibaserepopage-invalid-id": "ID“$1”未知。请使用有效的实体ID。",
"wikibase-wikibaserepopage-unresolved-redirect": "$1是重定向。",
"wikibase-wikibaserepopage-storage-exception": "尝试加载$1时出错:$2。",
+ "special-availablebadges": "可用徽章",
+ "wikibase-availablebadges-emptylist": "此wiki上没有配置徽章。",
"special-itembytitle": "按标题搜索项",
"wikibase-itembytitle-lookup-fieldset": "按网站和标题搜索项",
"wikibase-itembytitle-lookup-site": "网站:",
@@ -311,7 +313,7 @@
"wikibase-entitydata-unsupported-format": "该界面不支持数据格式$1。",
"wikibase-entitydata-storage-error": "无法载入实体$1。",
"wikibase-entitydata-title": "实体数据",
- "wikibase-entitydata-text": "本页面提供实体值的链接数据界面。请通过子页面语法,在URL中提供实体ID。\n*
内容协商根据您客户端的接受标头而定。这意味着实体数据将以您客户端定义的格式提供。在网络浏览器中,这将会是HTML,导致您的浏览器被重定向至正规的实体页面。\n*
您可以通过添加适当的文件扩展名至实体ID以明确请求一个特定数据格式:Q23.json将返回JSON格式的数据、Q23.ttl将返回RDF/Turtle格式等。",
+ "wikibase-entitydata-text": "本页面提供实体值的链接数据界面。请通过子页面语法,在URL中提供实体ID。\n*
内容协商根据您客户端的接受标头而定。这意味着实体数据将以您客户端定义的格式提供。在网络浏览器中,这将会是HTML,导致您的浏览器被重定向至正规的实体页面。\n*
您可以通过添加适当的文件扩展名至实体ID以明确请求一个特定数据格式:Q23.json将返回JSON格式的数据、Q23.ttl将返回RDF/Turtle格式等。支持的格式为:$1。",
"special-entitypage": "实体页面",
"wikibase-entitypage-title": "实体页面",
"wikibase-entitypage-text": "此页面重定向至其所属存储库上的实体页面。请使用子页面语法在URL中提供实体ID。",
diff --git a/extensions/Wikibase/repo/includes/Hooks/LinkBeginHookHandler.php
b/extensions/Wikibase/repo/includes/Hooks/LinkBeginHookHandler.php
index 9f45378..9a05110 100644
--- a/extensions/Wikibase/repo/includes/Hooks/LinkBeginHookHandler.php
+++ b/extensions/Wikibase/repo/includes/Hooks/LinkBeginHookHandler.php
@@ -171,17 +171,23 @@
$out = $context->getOutput();
$outTitle = $out->getTitle();
+ // For good measure: Don't do anything in case the OutputPage
has no Title set.
+ if ( !$outTitle ) {
+ return;
+ }
+
+ // if custom link text is given, there is no point in
overwriting it
+ // but not if it is similar to the plain title
+ if ( $html !== null && $target->getFullText() !== $html ) {
+ return;
+ }
+
$foreignEntityId = $this->parseForeignEntityId( $target );
$isLocal = !$foreignEntityId;
if ( $isLocal
&& !$this->entityNamespaceLookup->isEntityNamespace(
$target->getNamespace() )
) {
- return;
- }
-
- // For good measure: Don't do anything in case the OutputPage
has no Title set.
- if ( !$outTitle ) {
return;
}
@@ -206,12 +212,6 @@
if ( $isLocal && !$target->exists() ) {
// The link points to a non-existing item.
- return;
- }
-
- // if custom link text is given, there is no point in
overwriting it
- // but not if it is similar to the plain title
- if ( $html !== null && $target->getFullText() !== $html ) {
return;
}
diff --git
a/extensions/Wikibase/repo/includes/Specials/SpecialAvailableBadges.php
b/extensions/Wikibase/repo/includes/Specials/SpecialAvailableBadges.php
index efa26e8..28a5b8f 100644
--- a/extensions/Wikibase/repo/includes/Specials/SpecialAvailableBadges.php
+++ b/extensions/Wikibase/repo/includes/Specials/SpecialAvailableBadges.php
@@ -4,7 +4,6 @@
use Html;
use Wikibase\DataModel\Entity\ItemId;
-use Wikibase\DataModel\Entity\ItemIdParser;
use Wikibase\Lib\Store\EntityTitleLookup;
use Wikibase\Lib\Store\PrefetchingTermLookup;
@@ -32,6 +31,11 @@
*/
private $badgeItems;
+ /**
+ * @param PrefetchingTermLookup $prefetchingTermLookup
+ * @param EntityTitleLookup $entityTitleLookup
+ * @param string[] $badgeItems
+ */
public function __construct(
PrefetchingTermLookup $prefetchingTermLookup,
EntityTitleLookup $entityTitleLookup,
@@ -47,61 +51,60 @@
public function execute( $subPage ) {
parent::execute( $subPage );
- $this->displayResult();
- }
-
- private function displayResult() {
- $out = $this->getOutput();
- // XXX: Maybe we should use PrefixMappingEntityIdParser for
federation?
- $itemIdParser = new ItemIdParser();
-
- $itemIds = array_map( function( $item ) use ( $itemIdParser ) {
- return $itemIdParser->parse( $item );
- }, array_keys( $this->badgeItems ) );
-
- if ( empty( $itemIds ) ) {
- $out->addHTML( Html::element(
- 'p',
- [],
- $this->msg(
'wikibase-availablebadges-emptylist' )->text()
- ) );
-
- return;
- }
-
- $this->prefetchingTermLookup->prefetchTerms( $itemIds );
-
- $out->addHTML( Html::openElement( 'ol' ) );
- foreach ( $itemIds as $item ) {
- $this->displayRow( $item,
$this->badgeItems[$item->getSerialization()] );
- }
- $out->addHTML( Html::closeElement( 'ol' ) );
+ $this->getOutput()->addHTML( $this->makeAllBadgesHtml() );
}
/**
- * Render one badge.
- *
- * @param ItemId $item Item ID to render
- * @param string $badgeClass The given badge class
+ * @return string HTML
*/
- private function displayRow( ItemId $item, $badgeClass ) {
- $out = $this->getOutput();
+ private function makeAllBadgesHtml() {
+ if ( empty( $this->badgeItems ) ) {
+ return Html::element(
+ 'p',
+ [],
+ $this->msg(
'wikibase-availablebadges-emptylist' )->text()
+ );
+ }
- $title = $this->entityTitleLookup->getTitleForId( $item );
+ /** @var ItemId[] $itemIds */
+ $itemIds = array_map( function( $idString ) {
+ // XXX: Maybe we should use PrefixMappingEntityIdParser
for federation?
+ return new ItemId( $idString );
+ }, array_keys( $this->badgeItems ) );
+
+ $this->prefetchingTermLookup->prefetchTerms( $itemIds );
+
+ $html = Html::openElement( 'ol' );
+ foreach ( $itemIds as $id ) {
+ $html .= $this->makeBadgeHtml( $id,
$this->badgeItems[$id->getSerialization()] );
+ }
+ $html .= Html::closeElement( 'ol' );
+
+ return $html;
+ }
+
+ /**
+ * @param ItemId $badgeId
+ * @param string $badgeClass
+ *
+ * @return string HTML
+ */
+ private function makeBadgeHtml( ItemId $badgeId, $badgeClass ) {
+ $title = $this->entityTitleLookup->getTitleForId( $badgeId );
$description = $this->prefetchingTermLookup->getDescription(
- $item,
+ $badgeId,
$this->getLanguage()->getCode()
);
- $out->addHTML( Html::openElement( 'li' ) );
- $out->addHTML( Html::element( 'span', [
- 'class' => 'wb-badge ' . $badgeClass,
- ] ) );
- $out->addHTML( $this->getLinkRenderer()->makeLink( $title ) );
+ $html = Html::openElement( 'li' );
+ $html .= Html::element( 'span', [ 'class' => 'wb-badge ' .
$badgeClass ] );
+ $html .= $this->getLinkRenderer()->makeLink( $title );
if ( $description !== null ) {
- $out->addHTML( ' - ' . $description );
+ $html .= $this->msg( 'comma-separator' )->escaped() .
htmlspecialchars( $description );
}
- $out->addHTML( Html::closeElement( 'li' ) );
+ $html .= Html::closeElement( 'li' );
+
+ return $html;
}
}
diff --git
a/extensions/Wikibase/repo/tests/phpunit/includes/Dumpers/RdfDumpGeneratorTest.php
b/extensions/Wikibase/repo/tests/phpunit/includes/Dumpers/RdfDumpGeneratorTest.php
index d4b7764..38a0611 100644
---
a/extensions/Wikibase/repo/tests/phpunit/includes/Dumpers/RdfDumpGeneratorTest.php
+++
b/extensions/Wikibase/repo/tests/phpunit/includes/Dumpers/RdfDumpGeneratorTest.php
@@ -21,7 +21,6 @@
use Wikibase\Rdf\RdfVocabulary;
use Wikibase\Repo\Tests\Rdf\NTriplesRdfTestHelper;
use Wikibase\Repo\WikibaseRepo;
-use Wikibase\Repo\Tests\Rdf\RdfBuilderTest;
use Wikibase\Repo\Tests\Rdf\RdfBuilderTestData;
/**
diff --git
a/extensions/Wikibase/repo/tests/phpunit/includes/Rdf/NTriplesRdfTestHelper.php
b/extensions/Wikibase/repo/tests/phpunit/includes/Rdf/NTriplesRdfTestHelper.php
index a63460f..13d8e99 100644
---
a/extensions/Wikibase/repo/tests/phpunit/includes/Rdf/NTriplesRdfTestHelper.php
+++
b/extensions/Wikibase/repo/tests/phpunit/includes/Rdf/NTriplesRdfTestHelper.php
@@ -2,10 +2,7 @@
namespace Wikibase\Repo\Tests\Rdf;
-use InvalidArgumentException;
-use LogicException;
use PHPUnit_Framework_Assert;
-use PHPUnit_Framework_AssertionFailedError;
use RuntimeException;
/**
diff --git
a/extensions/Wikibase/repo/tests/phpunit/includes/Rdf/RdfBuilderTestData.php
b/extensions/Wikibase/repo/tests/phpunit/includes/Rdf/RdfBuilderTestData.php
index 070a585..950bdf7 100644
--- a/extensions/Wikibase/repo/tests/phpunit/includes/Rdf/RdfBuilderTestData.php
+++ b/extensions/Wikibase/repo/tests/phpunit/includes/Rdf/RdfBuilderTestData.php
@@ -16,7 +16,6 @@
use Wikibase\Rdf\RdfVocabulary;
use Wikibase\Repo\WikibaseRepo;
use Wikibase\Lib\Tests\MockRepository;
-use Wikimedia\Purtle\BNodeLabeler;
use Wikimedia\Purtle\NTriplesRdfWriter;
/**
diff --git a/extensions/Wikibase/repo/tests/phpunit/includes/RepoHooksTest.php
b/extensions/Wikibase/repo/tests/phpunit/includes/RepoHooksTest.php
index bcf3e54..fd0cbd7 100644
--- a/extensions/Wikibase/repo/tests/phpunit/includes/RepoHooksTest.php
+++ b/extensions/Wikibase/repo/tests/phpunit/includes/RepoHooksTest.php
@@ -67,6 +67,8 @@
$this->assertInternalType( 'string',
$actual['wikibase-conceptbaseuri'] );
+ $this->assertInternalType( 'string',
$actual['wikibase-geoshapestoragebaseurl'] );
+
if ( array_key_exists( 'wikibase-sparql', $actual ) ) {
$this->assertInternalType( 'string',
$actual['wikibase-sparql'] );
}
diff --git
a/extensions/Wikibase/repo/tests/phpunit/includes/Specials/SpecialEntityDataTest.php
b/extensions/Wikibase/repo/tests/phpunit/includes/Specials/SpecialEntityDataTest.php
index 20823c3..7f202b8 100644
---
a/extensions/Wikibase/repo/tests/phpunit/includes/Specials/SpecialEntityDataTest.php
+++
b/extensions/Wikibase/repo/tests/phpunit/includes/Specials/SpecialEntityDataTest.php
@@ -204,7 +204,7 @@
list( $output, ) = $this->executeSpecialPage( '', $request );
- $this->assertRegExp( '/Supported formats are: json, nt, rdf,
html/', $output, "output" );
+ $this->assertContains( 'Supported formats are: json, nt, rdf,
html', $output, "output" );
}
diff --git a/extensions/WikimediaBadges/.gitignore
b/extensions/WikimediaBadges/.gitignore
index 9e0631e..89b10f2 100644
--- a/extensions/WikimediaBadges/.gitignore
+++ b/extensions/WikimediaBadges/.gitignore
@@ -4,6 +4,7 @@
composer.phar
composer.lock
+node_modules/
vendor/
build/
diff --git a/extensions/WikimediaBadges/Gruntfile.js
b/extensions/WikimediaBadges/Gruntfile.js
index a89b9b0..2a477c4 100644
--- a/extensions/WikimediaBadges/Gruntfile.js
+++ b/extensions/WikimediaBadges/Gruntfile.js
@@ -1,11 +1,19 @@
module.exports = function ( grunt ) {
grunt.loadNpmTasks( 'grunt-jsonlint' );
+ grunt.loadNpmTasks( 'grunt-contrib-jshint' );
grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.loadNpmTasks( 'grunt-stylelint' );
grunt.initConfig( {
banana: {
all: [
'i18n/',
+ ]
+ },
+ jshint: {
+ all: [
+ '**/*.js',
+ '!node_modules/**',
+ '!vendor/**'
]
},
jsonlint: {
@@ -24,7 +32,7 @@
]
}
} );
- grunt.registerTask( 'lint', ['jsonlint', 'banana', 'stylelint'] );
+ grunt.registerTask( 'lint', ['jsonlint', 'banana', 'jshint',
'stylelint'] );
grunt.registerTask( 'test', ['lint'] );
grunt.registerTask( 'default', ['test'] );
};
diff --git a/extensions/WikimediaBadges/package.json
b/extensions/WikimediaBadges/package.json
index d399a6d..f806475 100644
--- a/extensions/WikimediaBadges/package.json
+++ b/extensions/WikimediaBadges/package.json
@@ -2,6 +2,7 @@
"devDependencies": {
"grunt": "1.0.1",
"grunt-banana-checker": "0.5.0",
+ "grunt-contrib-jshint": "1.1.0",
"grunt-jsonlint": "1.1.0",
"grunt-stylelint": "0.6.0",
"stylelint-config-wikimedia": "0.4.1"
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index a6f843a..077f4ee 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -115,19 +115,19 @@
"source": {
"type": "git",
"url":
"https://github.com/wikimedia/mediawiki-extensions-ArticlePlaceholder.git",
- "reference": "29cb26fb03f5fc6c8a801b8530ab47cf4e3c4c9d"
+ "reference": "215675361fdd61d9efc7e546748c3d6db19571b0"
},
"dist": {
"type": "zip",
- "url":
"https://api.github.com/repos/wikimedia/mediawiki-extensions-ArticlePlaceholder/zipball/29cb26fb03f5fc6c8a801b8530ab47cf4e3c4c9d",
- "reference": "29cb26fb03f5fc6c8a801b8530ab47cf4e3c4c9d",
+ "url":
"https://api.github.com/repos/wikimedia/mediawiki-extensions-ArticlePlaceholder/zipball/215675361fdd61d9efc7e546748c3d6db19571b0",
+ "reference": "215675361fdd61d9efc7e546748c3d6db19571b0",
"shasum": ""
},
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
"mediawiki/mediawiki-codesniffer": "0.7.2"
},
- "time": "2017-04-17 20:38:54",
+ "time": "2017-04-21 14:58:01",
"type": "mediawiki-extension",
"installation-source": "dist",
"autoload": {
@@ -1358,12 +1358,12 @@
"source": {
"type": "git",
"url":
"https://github.com/wikimedia/mediawiki-extensions-Wikibase.git",
- "reference": "ac94fbedfff67d4a50bdb9c374e8fb54b3d31d06"
+ "reference": "ba2d42a4b308ae22fb33740316f809cfc01481eb"
},
"dist": {
"type": "zip",
- "url":
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/ac94fbedfff67d4a50bdb9c374e8fb54b3d31d06",
- "reference": "ac94fbedfff67d4a50bdb9c374e8fb54b3d31d06",
+ "url":
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/ba2d42a4b308ae22fb33740316f809cfc01481eb",
+ "reference": "ba2d42a4b308ae22fb33740316f809cfc01481eb",
"shasum": ""
},
"require": {
@@ -1395,7 +1395,7 @@
"jakub-onderka/php-parallel-lint": ">=0.3 <0.10",
"mediawiki/mediawiki-codesniffer": ">=0.7 <0.8"
},
- "time": "2017-04-21 06:54:23",
+ "time": "2017-04-21 23:16:58",
"type": "mediawiki-extension",
"installation-source": "dist",
"autoload": {
@@ -1447,12 +1447,12 @@
"source": {
"type": "git",
"url":
"https://gerrit.wikimedia.org/r/mediawiki/extensions/WikimediaBadges",
- "reference": "b35c974c4057c2cd50c67b7bb4b005a7c2ad48ea"
+ "reference": "268b99ce34eaf727d940cf8a5c553f2453872862"
},
"require": {
"php": ">=5.3.0"
},
- "time": "2017-04-18 08:11:27",
+ "time": "2017-04-21 15:59:57",
"type": "mediawiki-extension",
"installation-source": "source",
"autoload": {
--
To view, visit https://gerrit.wikimedia.org/r/349730
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: If9d1e5c96de812e40b7ac4edc277157e5683ed12
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikidata
Gerrit-Branch: master
Gerrit-Owner: WikidataBuilder <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits