Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/164925
Change subject: New deployment build, partial fix for bug 71479 and editing properties ...................................................................... New deployment build, partial fix for bug 71479 and editing properties also fix for bug 71469 Change-Id: I2b3b6ba574fd09b9610844ba2aa36ef76b920acd --- M WikibaseClient.settings.php M WikibaseRepo.settings.php M composer.lock M extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js M extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.sitelinklistview.js M extensions/Wikibase/repo/includes/ClaimHtmlGenerator.php M extensions/Wikibase/repo/includes/View/FingerprintView.php M extensions/Wikibase/repo/includes/api/MergeItems.php M extensions/Wikibase/repo/includes/api/SetClaim.php M vendor/composer/installed.json 10 files changed, 57 insertions(+), 54 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikidata refs/changes/25/164925/1 diff --git a/WikibaseClient.settings.php b/WikibaseClient.settings.php index 7f45a99..e5209e6 100644 --- a/WikibaseClient.settings.php +++ b/WikibaseClient.settings.php @@ -1,2 +1,2 @@ <?php -$wgWBClientSettings["sharedCacheKeyPrefix"] = "wikibase:WBL/1412261754"; \ No newline at end of file +$wgWBClientSettings["sharedCacheKeyPrefix"] = "wikibase:WBL/1412589185"; \ No newline at end of file diff --git a/WikibaseRepo.settings.php b/WikibaseRepo.settings.php index 0b1e9bd..a8f8be9 100644 --- a/WikibaseRepo.settings.php +++ b/WikibaseRepo.settings.php @@ -1,2 +1,2 @@ <?php -$wgWBRepoSettings["sharedCacheKeyPrefix"] = "wikibase:WBL/1412261754"; \ No newline at end of file +$wgWBRepoSettings["sharedCacheKeyPrefix"] = "wikibase:WBL/1412589185"; \ No newline at end of file diff --git a/composer.lock b/composer.lock index cacff2a..9308ad1 100644 --- a/composer.lock +++ b/composer.lock @@ -1191,7 +1191,7 @@ "source": { "type": "git", "url": "https://git.wikimedia.org/git/mediawiki/extensions/Wikibase.git", - "reference": "6f2bf7dbd02099b84bb0067d238343a7b65de690" + "reference": "a69dcbf461a897bcb060a9322dc59c0145f160e9" }, "require": { "data-values/common": "~0.2.0", @@ -1262,7 +1262,7 @@ "issues": "https://bugzilla.wikimedia.org/", "irc": "irc://irc.freenode.net/wikidata" }, - "time": "2014-10-02 14:52:57" + "time": "2014-10-06 09:25:56" }, { "name": "wikibase/wikimedia-badges", diff --git a/extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js b/extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js index f323c34..1272bd6 100644 --- a/extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js +++ b/extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js @@ -366,15 +366,20 @@ if( this.$fingerprints ) { this.$fingerprints.data( 'fingerprintgroupview' )[state](); } - this.$claims.data( 'claimgrouplistview' )[state](); - // TODO: Resolve integration of referenceviews - this.$claims.find( '.wb-statement-references' ).each( function() { - var $listview = $( this ).children( ':wikibase-listview' ); - if( $listview.length ) { - $listview.data( 'listview' )[state](); - } - } ); - if( this.$siteLinks.length > 0 ) { + + // horrible, horrible hack until we have proper item and property views + if( this.$claims ) { + this.$claims.data( 'claimgrouplistview' )[state](); + // TODO: Resolve integration of referenceviews + this.$claims.find( '.wb-statement-references' ).each( function() { + var $listview = $( this ).children( ':wikibase-listview' ); + if( $listview.length ) { + $listview.data( 'listview' )[state](); + } + } ); + } + + if( this.$siteLinks && this.$siteLinks.length > 0 ) { this.$siteLinks.data( 'sitelinkgrouplistview' )[state](); } }, diff --git a/extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.sitelinklistview.js b/extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.sitelinklistview.js index fce3526..ba1748c 100644 --- a/extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.sitelinklistview.js +++ b/extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.sitelinklistview.js @@ -122,6 +122,23 @@ // Encapsulate sitelinkviews by suppressing their events: this.$listview + .listview( { + listItemAdapter: new $.wikibase.listview.ListItemAdapter( { + listItemWidget: listItemWidget, + listItemWidgetValueAccessor: 'value', + newItemOptionsFn: function( value ) { + return { + value: value, + getAllowedSiteIds: function() { + return self._getUnusedAllowedSiteIds(); + }, + entityStore: self.options.entityStore + }; + } + } ), + value: self.options.value || null, + listItemNodeName: 'TR' + } ) .on( prefix + 'change.' + this.widgetName, function( event ) { event.stopPropagation(); self._trigger( 'change' ); @@ -179,24 +196,7 @@ self._refreshTableHeader(); self._trigger( 'change' ); } - ) - .listview( { - listItemAdapter: new $.wikibase.listview.ListItemAdapter( { - listItemWidget: listItemWidget, - listItemWidgetValueAccessor: 'value', - newItemOptionsFn: function( value ) { - return { - value: value, - getAllowedSiteIds: function() { - return self._getUnusedAllowedSiteIds(); - }, - entityStore: self.options.entityStore - }; - } - } ), - value: self.options.value || null, - listItemNodeName: 'TR' - } ); + ); }, /** diff --git a/extensions/Wikibase/repo/includes/ClaimHtmlGenerator.php b/extensions/Wikibase/repo/includes/ClaimHtmlGenerator.php index 165f8e0..1ce9220 100644 --- a/extensions/Wikibase/repo/includes/ClaimHtmlGenerator.php +++ b/extensions/Wikibase/repo/includes/ClaimHtmlGenerator.php @@ -121,7 +121,7 @@ * @return string */ protected function getHtmlForQualifiers( Snaks $qualifiers, array $entityInfo ) { - $qualifiersByProperty = new ByPropertyIdArray( $qualifiers ); + $qualifiersByProperty = new ByPropertyIdArray( iterator_to_array( $qualifiers ) ); $qualifiersByProperty->buildIndex(); $snaklistviewsHtml = ''; @@ -171,7 +171,9 @@ * @return string */ protected function getHtmlForReference( $reference, array $entityInfo ) { - $referenceSnaksByProperty = new ByPropertyIdArray( $reference->getSnaks() ); + $snaks = $reference->getSnaks(); + + $referenceSnaksByProperty = new ByPropertyIdArray( iterator_to_array( $snaks ) ); $referenceSnaksByProperty->buildIndex(); $snaklistviewsHtml = ''; diff --git a/extensions/Wikibase/repo/includes/View/FingerprintView.php b/extensions/Wikibase/repo/includes/View/FingerprintView.php index e4326ea..34dafec 100644 --- a/extensions/Wikibase/repo/includes/View/FingerprintView.php +++ b/extensions/Wikibase/repo/includes/View/FingerprintView.php @@ -75,7 +75,7 @@ if ( $entityId !== null ) { $id = $entityId->getSerialization(); - $idInParentheses = wfMessage( 'parentheses', $id ); + $idInParentheses = wfMessage( 'parentheses', $id )->text(); } if ( $hasLabel ) { diff --git a/extensions/Wikibase/repo/includes/api/MergeItems.php b/extensions/Wikibase/repo/includes/api/MergeItems.php index bd29918..d5ec03c 100644 --- a/extensions/Wikibase/repo/includes/api/MergeItems.php +++ b/extensions/Wikibase/repo/includes/api/MergeItems.php @@ -23,7 +23,6 @@ */ class MergeItems extends ApiBase { - /** * @var EntityIdParser */ @@ -208,22 +207,19 @@ * @see ApiBase::getParamDescription */ public function getParamDescription() { - return array_merge( - parent::getParamDescription(), - array( - 'fromid' => array( 'The id to merge from' ), - 'toid' => array( 'The id to merge to' ), - 'ignoreconflicts' => array( 'Array of elements of the item to ignore conflicts for, can only contain values of "label" and or "description" and or "sitelink"' ), - 'token' => 'An "edittoken" token previously obtained through the token module (prop=info).', - 'summary' => array( 'Summary for the edit.', - "Will be prepended by an automatically generated comment. The length limit of the - autocomment together with the summary is 260 characters. Be aware that everything above that - limit will be cut off." - ), - 'bot' => array( 'Mark this edit as bot', - 'This URL flag will only be respected if the user belongs to the group "bot".' - ), - ) + return array( + 'fromid' => array( 'The id to merge from' ), + 'toid' => array( 'The id to merge to' ), + 'ignoreconflicts' => array( 'Array of elements of the item to ignore conflicts for, can only contain values of "label" and or "description" and or "sitelink"' ), + 'token' => 'An "edittoken" token previously obtained through the token module (prop=info).', + 'summary' => array( 'Summary for the edit.', + "Will be prepended by an automatically generated comment. The length limit of the + autocomment together with the summary is 260 characters. Be aware that everything above that + limit will be cut off." + ), + 'bot' => array( 'Mark this edit as bot', + 'This URL flag will only be respected if the user belongs to the group "bot".' + ), ); } diff --git a/extensions/Wikibase/repo/includes/api/SetClaim.php b/extensions/Wikibase/repo/includes/api/SetClaim.php index 3107534..d3a898d 100644 --- a/extensions/Wikibase/repo/includes/api/SetClaim.php +++ b/extensions/Wikibase/repo/includes/api/SetClaim.php @@ -88,7 +88,7 @@ wfDebugLog( 'wikibase-debug', "Failed to set claim on entity $prefixedId: " . var_export( $params, true ) ); - $this->dieError( 'Failed to save claim.' ); + $this->dieException( $ex, 'invalid-claim' ); } $this->getResultBuilder()->markSuccess(); diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 4e8edb1..a70dcc7 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -1281,7 +1281,7 @@ "source": { "type": "git", "url": "https://git.wikimedia.org/git/mediawiki/extensions/Wikibase.git", - "reference": "6f2bf7dbd02099b84bb0067d238343a7b65de690" + "reference": "a69dcbf461a897bcb060a9322dc59c0145f160e9" }, "require": { "data-values/common": "~0.2.0", @@ -1307,7 +1307,7 @@ "conflict": { "mediawiki/mediawiki": "<1.23" }, - "time": "2014-10-02 14:52:57", + "time": "2014-10-06 09:25:56", "type": "mediawiki-extension", "installation-source": "source", "autoload": { -- To view, visit https://gerrit.wikimedia.org/r/164925 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2b3b6ba574fd09b9610844ba2aa36ef76b920acd Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikidata Gerrit-Branch: wmf/1.25wmf1 Gerrit-Owner: Aude <aude.w...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits