Page MenuHomePhabricator

Add additional information to bridge config API module
Closed, ResolvedPublic

Description

The Bridge needs the following additional information from the repo:

  • URL of the terms of use
  • URL of the license
  • name of the license

Return it as part of the wbdatabridgeconfig API module.

Event Timeline

Change 577229 had a related patch set uploaded (by Michael Große; owner: Michael Große):
[mediawiki/extensions/Wikibase@master] Bridge: Add license settings to config API module

https://gerrit.wikimedia.org/r/577229

It seems the Terms of Use are not actually configured, but instead hard-coded win WikimediaMessages?

The wikibase-shortcopyrightwarning message gets the “terms of use” link target as a $2 parameter, the code must have it somewhere.

The wikibase-shortcopyrightwarning message gets the “terms of use” link target as a $2 parameter, the code must have it somewhere.

It’s a bit convoluted (via CopyrightMessageBuilder and SpecialPageCopyrightView), but in the end I believe that URL comes from $settings->getSetting( 'dataRightsUrl' ) (in repo/Wikibase.php, where $settings is WikibaseRepo::getDefaultInstance()->getSettings()).

No, sorry, I got that wrong. the dataRightsUrl becomes, together with the dataRightsText, the $3 argument to wikibase-shortcopyrightwarning, which is the license link. $2 comes from CopyrightMessageBuilder::renderCopyrightPageMessage(), which is the copyrightpage message (but in the content language).

Change 577229 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] bridge: Add license settings to config API module

https://gerrit.wikimedia.org/r/577229