Hoo man has uploaded a new change for review.
https://gerrit.wikimedia.org/r/191769
Change subject: Update Wikibase
......................................................................
Update Wikibase
Contains:
I6b8b7bce1f2843af0fa43db24af9c71a2c3e875c
I438e9185afb28753ac922d2f81cfe6bece9d2660
Ide8f7dacc3e74184f3b83c92e985a01dcf2ffd42
I9212b4dd7b1868fa7acf92c57ed2a0277214bcb0
Change-Id: I4588974da1aeb02f948922dbe6caa1ddf958ad66
---
M composer.lock
M extensions/Wikibase/client/includes/Changes/ChangeHandler.php
M
extensions/Wikibase/client/tests/phpunit/includes/Changes/ChangeHandlerTest.php
M
extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js
M extensions/Wikibase/repo/includes/Notifications/ChangeNotifier.php
M
extensions/Wikibase/repo/tests/phpunit/includes/Notifications/ChangeNotifierTest.php
M vendor/composer/ClassLoader.php
M vendor/composer/autoload_files.php
M vendor/composer/installed.json
9 files changed, 154 insertions(+), 118 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikidata
refs/changes/69/191769/1
diff --git a/composer.lock b/composer.lock
index bc68abe..b9db37b 100644
--- a/composer.lock
+++ b/composer.lock
@@ -1234,12 +1234,12 @@
"source": {
"type": "git",
"url":
"https://github.com/wikimedia/mediawiki-extensions-Wikibase.git",
- "reference": "0cb7ec6225a72a966046f0225a4fd9522f38cd05"
+ "reference": "c2b41e462a7e05c1b1a99b4273ecfb89b020cbb8"
},
"dist": {
"type": "zip",
- "url":
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/0cb7ec6225a72a966046f0225a4fd9522f38cd05",
- "reference": "0cb7ec6225a72a966046f0225a4fd9522f38cd05",
+ "url":
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/c2b41e462a7e05c1b1a99b4273ecfb89b020cbb8",
+ "reference": "c2b41e462a7e05c1b1a99b4273ecfb89b020cbb8",
"shasum": ""
},
"require": {
@@ -1306,7 +1306,7 @@
"wikibaserepo",
"wikidata"
],
- "time": "2015-02-12 15:34:02"
+ "time": "2015-02-19 21:07:13"
},
{
"name": "wikibase/wikimedia-badges",
@@ -1368,6 +1368,7 @@
"wikibase/wikidata.org": 20
},
"prefer-stable": false,
+ "prefer-lowest": false,
"platform": {
"php": ">=5.3.0"
},
diff --git a/extensions/Wikibase/client/includes/Changes/ChangeHandler.php
b/extensions/Wikibase/client/includes/Changes/ChangeHandler.php
index 1942555..65d5476 100644
--- a/extensions/Wikibase/client/includes/Changes/ChangeHandler.php
+++ b/extensions/Wikibase/client/includes/Changes/ChangeHandler.php
@@ -206,13 +206,10 @@
$all = isset( $aspects[EntityUsage::ALL_USAGE] );
if ( isset( $aspects[EntityUsage::SITELINK_USAGE] ) || $all ) {
- // @fixme: LinksUpdate doesn't seem to work to refresh
site links
- // when used on it's own with out parsing.
- // LinksUpdate or our interaction with it should be
changed
- // so that site links can be updated without parse.
- // For now, we need to still do parse for site link
changes.
- //
- // $actions[self::LINKS_UPDATE_ACTION] = true;
+ $actions[self::LINKS_UPDATE_ACTION] = true;
+
+ // TODO: introduce an update action that updates just
the metadata
+ // in the cached ParserOutput, without re-parsing the
page!
$actions[self::PARSER_PURGE_ACTION] = true;
}
@@ -234,11 +231,6 @@
$actions[self::WEB_PURGE_ACTION] = true;
$actions[self::RC_ENTRY_ACTION] = true;
$actions[self::HISTORY_ENTRY_ACTION] = true;
- }
-
- // If we purge the parser cache, the links update is redundant.
- if ( isset( $actions[self::PARSER_PURGE_ACTION] ) ) {
- unset( $actions[self::LINKS_UPDATE_ACTION] );
}
return array_keys( $actions );
diff --git
a/extensions/Wikibase/client/tests/phpunit/includes/Changes/ChangeHandlerTest.php
b/extensions/Wikibase/client/tests/phpunit/includes/Changes/ChangeHandlerTest.php
index a7b5f28..9b46dbc 100644
---
a/extensions/Wikibase/client/tests/phpunit/includes/Changes/ChangeHandlerTest.php
+++
b/extensions/Wikibase/client/tests/phpunit/includes/Changes/ChangeHandlerTest.php
@@ -190,8 +190,8 @@
),
'sitelink usage' => array( // #1
array( EntityUsage::SITELINK_USAGE ),
- array( ChangeHandler::PARSER_PURGE_ACTION,
ChangeHandler::WEB_PURGE_ACTION, ChangeHandler::RC_ENTRY_ACTION ),
- array( ChangeHandler::LINKS_UPDATE_ACTION )
+ array( ChangeHandler::LINKS_UPDATE_ACTION,
ChangeHandler::PARSER_PURGE_ACTION, ChangeHandler::WEB_PURGE_ACTION,
ChangeHandler::RC_ENTRY_ACTION ),
+ array( )
),
'label usage' => array(
array( EntityUsage::LABEL_USAGE ),
@@ -211,12 +211,12 @@
'all usage' => array(
array( EntityUsage::ALL_USAGE ),
array( ChangeHandler::PARSER_PURGE_ACTION,
ChangeHandler::WEB_PURGE_ACTION, ChangeHandler::RC_ENTRY_ACTION ),
- array( ChangeHandler::LINKS_UPDATE_ACTION )
+ array()
),
- 'sitelink and other usage (no redundant links update)'
=> array(
+ 'sitelink and other usage (does links update)' => array(
array( EntityUsage::SITELINK_USAGE,
EntityUsage::OTHER_USAGE ),
- array( ChangeHandler::PARSER_PURGE_ACTION,
ChangeHandler::WEB_PURGE_ACTION, ChangeHandler::RC_ENTRY_ACTION ),
- array( ChangeHandler::LINKS_UPDATE_ACTION )
+ array( ChangeHandler::LINKS_UPDATE_ACTION,
ChangeHandler::PARSER_PURGE_ACTION, ChangeHandler::WEB_PURGE_ACTION,
ChangeHandler::RC_ENTRY_ACTION ),
+ array()
),
);
}
@@ -512,14 +512,21 @@
$emmyUpdateLinks = array(
'purgeParserCache' => array( 'Emmy' => true ),
- 'scheduleRefreshLinks' => array(),
+ 'scheduleRefreshLinks' => array( 'Emmy' => true ),
'purgeWebCache' => array( 'Emmy' => true ),
'injectRCRecord' => array( 'Emmy' => true ),
);
$emmy2UpdateLinks = array(
'purgeParserCache' => array( 'Emmy2' => true ),
- 'scheduleRefreshLinks' => array(),
+ 'scheduleRefreshLinks' => array( 'Emmy2' => true ),
+ 'purgeWebCache' => array( 'Emmy2' => true ),
+ 'injectRCRecord' => array( 'Emmy2' => true ),
+ );
+
+ $emmy2UpdateAll = array(
+ 'purgeParserCache' => array( 'Emmy2' => true ),
+ 'scheduleRefreshLinks' => array( 'Emmy2' => true ),
'purgeWebCache' => array( 'Emmy2' => true ),
'injectRCRecord' => array( 'Emmy2' => true ),
);
@@ -554,7 +561,7 @@
array( // #5
$changes['item-deletion-linked'],
array( 'q100' => array( 'enwiki' => 'Emmy2' ) ),
- $emmy2PurgeParser
+ $emmy2UpdateAll
),
array( // #6
@@ -610,7 +617,7 @@
array( 'q100' => array( 'enwiki' => 'Emmy' ),
'q200' => array( 'enwiki' => 'Emmy2' ) ),
array(
'purgeParserCache' => array( 'Emmy' =>
true, 'Emmy2' => true ),
- 'scheduleRefreshLinks' => array(),
+ 'scheduleRefreshLinks' => array( 'Emmy'
=> true, 'Emmy2' => true ),
'purgeWebCache' => array( 'Emmy' =>
true, 'Emmy2' => true ),
'injectRCRecord' => array( 'Emmy' =>
true, 'Emmy2' => true ),
)
diff --git
a/extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js
b/extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js
index 2b59c3c..bd270ca 100644
---
a/extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js
+++
b/extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js
@@ -247,10 +247,10 @@
}
}
- var $pageNameInput = $( '<input>', {
- placeholder: mw.msg(
'wikibase-sitelink-page-edit-placeholder' ),
- dir: dir
- } ).pagesuggester( pageNameInputOptions );
+ var $pageNameInput = $( '<input>' )
+ .attr( 'placeholder', mw.msg(
'wikibase-sitelink-page-edit-placeholder' ) )
+ .attr( 'dir', dir )
+ .pagesuggester( pageNameInputOptions );
var pagesuggester = $pageNameInput.data( 'pagesuggester' );
@@ -270,7 +270,10 @@
return;
}
- var $siteIdInput = $( '<input />' )
+ var $siteIdInput = $( '<input>' )
+ // FIXME: "noime" class prevents Universal Language
Selector's IME from being applied
+ // to the input element with the IME overlaying the
site suggestions (see T88417).
+ .addClass( 'noime' )
.attr( 'placeholder', mw.msg(
'wikibase-sitelink-site-edit-placeholder' ) )
.siteselector( {
source: self.options.getAllowedSites
diff --git a/extensions/Wikibase/repo/includes/Notifications/ChangeNotifier.php
b/extensions/Wikibase/repo/includes/Notifications/ChangeNotifier.php
index ea2dcbb..9062650 100644
--- a/extensions/Wikibase/repo/includes/Notifications/ChangeNotifier.php
+++ b/extensions/Wikibase/repo/includes/Notifications/ChangeNotifier.php
@@ -86,8 +86,10 @@
}
$change = $this->changeFactory->newFromUpdate(
EntityChange::RESTORE, null, $content->getEntity() );
-
$change->setRevisionInfo( $revision );
+ // We don't want the change entries of newly undeleted pages to
have
+ // the timestamp of the original change.
+ $change->setTimestamp( wfTimestampNow() );
$user = User::newFromId( $revision->getUser() );
$change->setMetadataFromUser( $user );
diff --git
a/extensions/Wikibase/repo/tests/phpunit/includes/Notifications/ChangeNotifierTest.php
b/extensions/Wikibase/repo/tests/phpunit/includes/Notifications/ChangeNotifierTest.php
index a8abbd4..8c24387 100644
---
a/extensions/Wikibase/repo/tests/phpunit/includes/Notifications/ChangeNotifierTest.php
+++
b/extensions/Wikibase/repo/tests/phpunit/includes/Notifications/ChangeNotifierTest.php
@@ -154,7 +154,7 @@
$user = $this->makeUser( 'ChangeNotifierTestUser' );
$user->setId( 17 );
- $timestamp = '20140523' . '174822';
+ $timestamp = '20140523174822';
$content = $this->makeItemContent( new ItemId( 'Q12' ) );
$revisionId = 12345;
@@ -162,13 +162,13 @@
$notifier = $this->getChangeNotifier();
$change = $notifier->notifyOnPageUndeleted( $revision );
+ $fields = $change->getFields();
$this->assertFields(
array(
'object_id' => strtolower(
$content->getEntityId()->getSerialization() ),
'user_id' => $user->getId(),
'revision_id' => $revisionId,
- 'time' => $timestamp,
'type' => 'wikibase-item~restore',
'info' => array(
'metadata' => array(
@@ -177,7 +177,12 @@
)
)
),
- $change->getFields()
+ $fields
+ );
+
+ $this->assertTrue(
+ wfTimestamp() - $fields['time'] < 10,
+ "Page undeletions should use the current timestamp, not
the one from the revision"
);
}
diff --git a/vendor/composer/ClassLoader.php b/vendor/composer/ClassLoader.php
index 70d78bc..5e1469e 100644
--- a/vendor/composer/ClassLoader.php
+++ b/vendor/composer/ClassLoader.php
@@ -54,6 +54,8 @@
private $useIncludePath = false;
private $classMap = array();
+ private $classMapAuthoritative = false;
+
public function getPrefixes()
{
if (!empty($this->prefixesPsr0)) {
@@ -249,6 +251,27 @@
}
/**
+ * Turns off searching the prefix and fallback directories for classes
+ * that have not been registered with the class map.
+ *
+ * @param bool $classMapAuthoritative
+ */
+ public function setClassMapAuthoritative($classMapAuthoritative)
+ {
+ $this->classMapAuthoritative = $classMapAuthoritative;
+ }
+
+ /**
+ * Should class lookup fail if not found in the current class map?
+ *
+ * @return bool
+ */
+ public function isClassMapAuthoritative()
+ {
+ return $this->classMapAuthoritative;
+ }
+
+ /**
* Registers this instance as an autoloader.
*
* @param bool $prepend Whether to prepend the autoloader or not
@@ -299,6 +322,9 @@
if (isset($this->classMap[$class])) {
return $this->classMap[$class];
}
+ if ($this->classMapAuthoritative) {
+ return false;
+ }
$file = $this->findFileWithExtension($class, '.php');
diff --git a/vendor/composer/autoload_files.php
b/vendor/composer/autoload_files.php
index 51e312c..25187cc 100644
--- a/vendor/composer/autoload_files.php
+++ b/vendor/composer/autoload_files.php
@@ -22,6 +22,6 @@
$baseDir . '/extensions/ValueView/ValueView.php',
$vendorDir . '/data-values/data-types/DataTypes.php',
$vendorDir . '/data-values/validators/Validators.php',
- $baseDir . '/extensions/Wikibase/Wikibase.composer.php',
$baseDir . '/extensions/WikimediaBadges/WikimediaBadges.php',
+ $baseDir . '/extensions/Wikibase/Wikibase.composer.php',
);
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index 779273a..6a5df9b 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -1220,88 +1220,6 @@
]
},
{
- "name": "wikibase/wikibase",
- "version": "dev-wmf/1.25wmf16",
- "version_normalized": "dev-wmf/1.25wmf16",
- "source": {
- "type": "git",
- "url":
"https://github.com/wikimedia/mediawiki-extensions-Wikibase.git",
- "reference": "0cb7ec6225a72a966046f0225a4fd9522f38cd05"
- },
- "dist": {
- "type": "zip",
- "url":
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/0cb7ec6225a72a966046f0225a4fd9522f38cd05",
- "reference": "0cb7ec6225a72a966046f0225a4fd9522f38cd05",
- "shasum": ""
- },
- "require": {
- "data-values/common": "~0.2.0",
- "data-values/data-types": "~0.4.0",
- "data-values/data-values": "~1.0.0",
- "data-values/geo": "~1.0",
- "data-values/interfaces": "~0.1.4",
- "data-values/javascript": "~0.6.0",
- "data-values/number": "~0.4.0",
- "data-values/serialization": "~1.0",
- "data-values/time": "~0.6.0",
- "data-values/validators": "~0.1.0",
- "data-values/value-view": "~0.11.0",
- "diff/diff": "~1.0",
- "php": ">=5.3.2",
- "wikibase/data-model": "~2.5",
- "wikibase/data-model-javascript": "~1.0",
- "wikibase/data-model-serialization": "~1.2",
- "wikibase/easyrdf_lite": "~0.8.1",
- "wikibase/internal-serialization": "~1.3",
- "wikibase/javascript-api": "~1.0",
- "wikibase/serialization-javascript": "~2.0"
- },
- "conflict": {
- "mediawiki/mediawiki": "<1.23"
- },
- "time": "2015-02-12 15:34:02",
- "type": "mediawiki-extension",
- "installation-source": "dist",
- "autoload": {
- "files": [
- "Wikibase.composer.php"
- ],
- "classmap": [
- "client/includes/",
- "client/WikibaseClient.hooks.php",
- "client/tests/phpunit/",
- "lib/includes/",
- "lib/WikibaseLib.hooks.php",
- "lib/tests/phpunit/",
- "repo/includes/",
- "repo/maintenance/",
- "repo/tests/phpunit/",
- "repo/Wikibase.hooks.php"
- ],
- "psr-4": {
- "Wikibase\\Repo\\View\\": "repo/includes/View"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "GPL-2.0+"
- ],
- "authors": [
- {
- "name": "The Wikidata team"
- }
- ],
- "description": "Structured data repository for MediaWiki",
- "homepage": "http://wikiba.se",
- "keywords": [
- "wikibase",
- "wikibaseclient",
- "wikibaselib",
- "wikibaserepo",
- "wikidata"
- ]
- },
- {
"name": "wikibase/wikimedia-badges",
"version": "dev-master",
"version_normalized": "9999999-dev",
@@ -1400,5 +1318,87 @@
"irc": "irc://irc.freenode.net/wikidata",
"source": "https://github.com/wmde/Wikidata.org/tree/master"
}
+ },
+ {
+ "name": "wikibase/wikibase",
+ "version": "dev-wmf/1.25wmf16",
+ "version_normalized": "dev-wmf/1.25wmf16",
+ "source": {
+ "type": "git",
+ "url":
"https://github.com/wikimedia/mediawiki-extensions-Wikibase.git",
+ "reference": "c2b41e462a7e05c1b1a99b4273ecfb89b020cbb8"
+ },
+ "dist": {
+ "type": "zip",
+ "url":
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/c2b41e462a7e05c1b1a99b4273ecfb89b020cbb8",
+ "reference": "c2b41e462a7e05c1b1a99b4273ecfb89b020cbb8",
+ "shasum": ""
+ },
+ "require": {
+ "data-values/common": "~0.2.0",
+ "data-values/data-types": "~0.4.0",
+ "data-values/data-values": "~1.0.0",
+ "data-values/geo": "~1.0",
+ "data-values/interfaces": "~0.1.4",
+ "data-values/javascript": "~0.6.0",
+ "data-values/number": "~0.4.0",
+ "data-values/serialization": "~1.0",
+ "data-values/time": "~0.6.0",
+ "data-values/validators": "~0.1.0",
+ "data-values/value-view": "~0.11.0",
+ "diff/diff": "~1.0",
+ "php": ">=5.3.2",
+ "wikibase/data-model": "~2.5",
+ "wikibase/data-model-javascript": "~1.0",
+ "wikibase/data-model-serialization": "~1.2",
+ "wikibase/easyrdf_lite": "~0.8.1",
+ "wikibase/internal-serialization": "~1.3",
+ "wikibase/javascript-api": "~1.0",
+ "wikibase/serialization-javascript": "~2.0"
+ },
+ "conflict": {
+ "mediawiki/mediawiki": "<1.23"
+ },
+ "time": "2015-02-19 21:07:13",
+ "type": "mediawiki-extension",
+ "installation-source": "dist",
+ "autoload": {
+ "files": [
+ "Wikibase.composer.php"
+ ],
+ "classmap": [
+ "client/includes/",
+ "client/WikibaseClient.hooks.php",
+ "client/tests/phpunit/",
+ "lib/includes/",
+ "lib/WikibaseLib.hooks.php",
+ "lib/tests/phpunit/",
+ "repo/includes/",
+ "repo/maintenance/",
+ "repo/tests/phpunit/",
+ "repo/Wikibase.hooks.php"
+ ],
+ "psr-4": {
+ "Wikibase\\Repo\\View\\": "repo/includes/View"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "GPL-2.0+"
+ ],
+ "authors": [
+ {
+ "name": "The Wikidata team"
+ }
+ ],
+ "description": "Structured data repository for MediaWiki",
+ "homepage": "http://wikiba.se",
+ "keywords": [
+ "wikibase",
+ "wikibaseclient",
+ "wikibaselib",
+ "wikibaserepo",
+ "wikidata"
+ ]
}
]
--
To view, visit https://gerrit.wikimedia.org/r/191769
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4588974da1aeb02f948922dbe6caa1ddf958ad66
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikidata
Gerrit-Branch: wmf/1.25wmf16
Gerrit-Owner: Hoo man <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits