Hoo man has uploaded a new change for review.
https://gerrit.wikimedia.org/r/71545
Change subject: Use the wbgetentities normalization in jquery.wikibase.linkitem
......................................................................
Use the wbgetentities normalization in jquery.wikibase.linkitem
Fixes an often reported flaw...
Change-Id: I5e518b577c061502d1652eff647fb6794cf80ffb
---
M client/resources/jquery.wikibase/jquery.wikibase.linkitem.js
M lib/resources/wikibase.RepoApi/wikibase.RepoApi.js
2 files changed, 15 insertions(+), 5 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase
refs/changes/45/71545/1
diff --git a/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js
b/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js
index ae0f8a1..5052f45 100644
--- a/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js
+++ b/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js
@@ -332,9 +332,17 @@
// Show a spinning animation and do an API request
this._showSpinner();
- this.repoApi.getEntitiesByPage( this.targetSite,
this.targetArticle, ['info', 'sitelinks'], mw.config.get( 'wgUserLanguage' ),
'sitelinks', 'ascending' )
- .done( $.proxy( this._onEntityLoad, this ) )
- .fail( $.proxy( this._onError, this ) );
+ this.repoApi.getEntitiesByPage(
+ this.targetSite,
+ this.targetArticle,
+ ['info', 'sitelinks'],
+ mw.config.get( 'wgUserLanguage' ),
+ 'sitelinks',
+ 'ascending',
+ true
+ )
+ .done( $.proxy( this._onEntityLoad, this ) )
+ .fail( $.proxy( this._onError, this ) );
},
/**
diff --git a/lib/resources/wikibase.RepoApi/wikibase.RepoApi.js
b/lib/resources/wikibase.RepoApi/wikibase.RepoApi.js
index 9946867..658184a 100644
--- a/lib/resources/wikibase.RepoApi/wikibase.RepoApi.js
+++ b/lib/resources/wikibase.RepoApi/wikibase.RepoApi.js
@@ -120,9 +120,10 @@
* default: null (unsorted)
* @param {String} [dir] Sort direction may be 'ascending' or
'descending'
* default: null (ascending)
+ * @param {bool} [normalize] Whether to normalize titles
server side
* @return {jQuery.Promise}
*/
- getEntitiesByPage: function( sites, titles, props, languages, sort, dir
) {
+ getEntitiesByPage: function( sites, titles, props, languages, sort,
dir, normalize ) {
var params = {
action: 'wbgetentities',
sites: this._normalizeParam( sites ),
@@ -130,7 +131,8 @@
props: this._normalizeParam( props ),
languages: this._normalizeParam( languages ),
sort: this._normalizeParam( sort ),
- dir: dir || undefined
+ dir: dir || undefined,
+ normalize: normalize || undefined
};
return this.get( params );
--
To view, visit https://gerrit.wikimedia.org/r/71545
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5e518b577c061502d1652eff647fb6794cf80ffb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Hoo man <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits