jenkins-bot has submitted this change and it was merged. Change subject: Remove enableSiteLinkWidget setting in the client ......................................................................
Remove enableSiteLinkWidget setting in the client This is true by default, and has been for a while and true, as used on wikimedia sites. The setting was introduced when the widget was introduced, just in case there were performance issues and it had to be disabled. No need for the setting now and makes things over complex. Change-Id: I5e143dbba00dc524ce412c3ab6abd53abbd90226 --- M client/RELEASE-NOTES M client/WikibaseClient.hooks.php M client/config/WikibaseClient.default.php M client/includes/RepoItemLinkGenerator.php M client/tests/phpunit/includes/RepoItemLinkGeneratorTest.php M docs/options.wiki 6 files changed, 5 insertions(+), 12 deletions(-) Approvals: WikidataJenkins: Verified Daniel Kinzler: Checked; Looks good to me, approved jenkins-bot: Verified diff --git a/client/RELEASE-NOTES b/client/RELEASE-NOTES index 2aaf900..eba16cf 100644 --- a/client/RELEASE-NOTES +++ b/client/RELEASE-NOTES @@ -3,7 +3,8 @@ Extension page on mediawiki.org: https://www.mediawiki.org/wiki/Extension:Wikibase_Client Latest version of the release notes: https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/Wikibase.git;a=blob;f=client/RELEASE-NOTES - +=== Version 0.5 === +* Removed enableSiteLinkWidget setting, which was true by default. === Version 0.4 === (dev) diff --git a/client/WikibaseClient.hooks.php b/client/WikibaseClient.hooks.php index db4b34a..4900c43 100644 --- a/client/WikibaseClient.hooks.php +++ b/client/WikibaseClient.hooks.php @@ -503,7 +503,7 @@ // (as that only runs after the element initially appeared). $out->addModules( 'wikibase.client.nolanglinks' ); - if ( $settings->getSetting( 'enableSiteLinkWidget' ) === true && $user->isLoggedIn() === true ) { + if ( $user->isLoggedIn() === true ) { // Add the JavaScript which lazy-loads the link item widget // (needed as jquery.wikibase.linkitem has pretty heavy dependencies) $out->addModules( 'wikibase.client.linkitem.init' ); @@ -588,7 +588,6 @@ WikibaseClient::getDefaultInstance()->getNamespaceChecker(), $repoLinker, $entityIdParser, - $settings->getSetting( 'enableSiteLinkWidget' ), $siteGroup ); diff --git a/client/config/WikibaseClient.default.php b/client/config/WikibaseClient.default.php index 77660b7..36eaf5e 100644 --- a/client/config/WikibaseClient.default.php +++ b/client/config/WikibaseClient.default.php @@ -37,7 +37,6 @@ 'wikibase-property' => 'Property' ), 'allowDataTransclusion' => true, - 'enableSiteLinkWidget' => true, 'propagateChangesToRepo' => true, 'otherProjectsLinks' => array(), diff --git a/client/includes/RepoItemLinkGenerator.php b/client/includes/RepoItemLinkGenerator.php index 0008102..90e0588 100644 --- a/client/includes/RepoItemLinkGenerator.php +++ b/client/includes/RepoItemLinkGenerator.php @@ -19,8 +19,6 @@ protected $entityIdParser; - protected $enableSiteLinkWidget; - protected $siteGroup; /** @@ -29,16 +27,14 @@ * @param NamespaceChecker $namespaceChecker * @param RepoLinker $repoLinker * @param EntityIdParser $entityIdParser - * @param boolean $enableSiteLinkWidget * @param string $siteGroup */ public function __construct( NamespaceChecker $namespaceChecker, RepoLinker $repoLinker, - EntityIdParser $entityIdParser, $enableSiteLinkWidget, $siteGroup ) { + EntityIdParser $entityIdParser, $siteGroup ) { $this->namespaceChecker = $namespaceChecker; $this->repoLinker = $repoLinker; $this->entityIdParser = $entityIdParser; - $this->enableSiteLinkWidget = $enableSiteLinkWidget; $this->siteGroup = $siteGroup; } @@ -63,7 +59,7 @@ // link to the associated item on the repo $editLink = $this->getEditLinksLink( $entityId ); } else { - if ( $this->enableSiteLinkWidget === true && ! $isAnon ) { + if ( !$isAnon ) { $editLink = $this->getAddLinksLink(); } } diff --git a/client/tests/phpunit/includes/RepoItemLinkGeneratorTest.php b/client/tests/phpunit/includes/RepoItemLinkGeneratorTest.php index 5f9c0db..c6d65bc 100644 --- a/client/tests/phpunit/includes/RepoItemLinkGeneratorTest.php +++ b/client/tests/phpunit/includes/RepoItemLinkGeneratorTest.php @@ -101,7 +101,6 @@ $namespaceChecker, $repoLinker, $entityIdParser, - true, 'wikipedia' ); diff --git a/docs/options.wiki b/docs/options.wiki index 4b11d1d..3c886b9 100644 --- a/docs/options.wiki +++ b/docs/options.wiki @@ -93,7 +93,6 @@ ) </poem> ;allowDataTransclusion: switch to enable data transclusion features like the <nowiki>{{#property}}</nowiki> parser function and the <tt>wikibase</tt> Scribunto module. Defaults to <tt>true</tt>. -;enableSiteLinkWidget: switch to enable or disable add site link widget. Defaults to <tt>true</tt>. ;propagateChangesToRepo: switch to enable or disable the propagation of client changes to the repo. Defaults to <tt>true</tt>. ;languageLinkSiteGroup: the ID of the site group to be shown as language links. Defaults to <tt>null</tt>, which means the site's own site group. -- To view, visit https://gerrit.wikimedia.org/r/119509 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5e143dbba00dc524ce412c3ab6abd53abbd90226 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Aude <aude.w...@gmail.com> Gerrit-Reviewer: Addshore <addshorew...@gmail.com> Gerrit-Reviewer: Aude <aude.w...@gmail.com> Gerrit-Reviewer: Daniel Kinzler <daniel.kinz...@wikimedia.de> Gerrit-Reviewer: Hoo man <h...@online.de> Gerrit-Reviewer: Tobias Gritschacher <tobias.gritschac...@wikimedia.de> Gerrit-Reviewer: WikidataJenkins <wikidata-servi...@wikimedia.de> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits