jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/370972 )

Change subject: remove unused injectrecentChanges option
......................................................................


remove unused injectrecentChanges option

This setting has been ineffective since I19f29d7784fae

Change-Id: I3d38a459460f19744fbfdb8ff31c0a9ededb8499
---
M client/config/WikibaseClient.default.php
M client/config/WikibaseClient.example.php
M client/includes/Changes/ChangeHandler.php
M client/includes/WikibaseClient.php
M client/tests/phpunit/includes/Changes/ChangeHandlerTest.php
M docs/options.wiki
6 files changed, 4 insertions(+), 30 deletions(-)

Approvals:
  jenkins-bot: Verified
  Thiemo Mättig (WMDE): Looks good to me, approved



diff --git a/client/config/WikibaseClient.default.php 
b/client/config/WikibaseClient.default.php
index 0f233c3..29b8098 100644
--- a/client/config/WikibaseClient.default.php
+++ b/client/config/WikibaseClient.default.php
@@ -24,7 +24,6 @@
                // but we will need to make sure the caching works good enough
                'siteLocalID' => $wgLanguageCode,
                'languageLinkSiteGroup' => null,
-               'injectRecentChanges' => true,
                'showExternalRecentChanges' => true,
                'sendEchoNotification' => false,
                'echoIcon' => false,
diff --git a/client/config/WikibaseClient.example.php 
b/client/config/WikibaseClient.example.php
index 27469f0..07d4489 100644
--- a/client/config/WikibaseClient.example.php
+++ b/client/config/WikibaseClient.example.php
@@ -20,7 +20,6 @@
 // Defaults to $wgDBname.
 // $wgWBClientSettings['siteGlobalID'] = "mywiki";
 
-$wgWBClientSettings['injectRecentChanges'] = true;
 $wgWBClientSettings['showExternalRecentChanges'] = true;
 
 // If this wiki also runs the Wikibase repo extension,
diff --git a/client/includes/Changes/ChangeHandler.php 
b/client/includes/Changes/ChangeHandler.php
index 58dc2ec..3c65800 100644
--- a/client/includes/Changes/ChangeHandler.php
+++ b/client/includes/Changes/ChangeHandler.php
@@ -50,23 +50,11 @@
        private $siteLookup;
 
        /**
-        * @var string
-        */
-       private $repoId;
-
-       /**
-        * @var bool
-        */
-       private $injectRecentChanges;
-
-       /**
         * @param AffectedPagesFinder $affectedPagesFinder
         * @param TitleFactory $titleFactory
         * @param PageUpdater $updater
         * @param ChangeRunCoalescer $changeRunCoalescer
         * @param SiteLookup $siteLookup
-        * @param string $repoId
-        * @param bool $injectRecentChanges
         *
         * @throws InvalidArgumentException
         */
@@ -75,21 +63,13 @@
                TitleFactory $titleFactory,
                PageUpdater $updater,
                ChangeRunCoalescer $changeRunCoalescer,
-               SiteLookup $siteLookup,
-               $repoId,
-               $injectRecentChanges = true
+               SiteLookup $siteLookup
        ) {
-               if ( !is_bool( $injectRecentChanges ) ) {
-                       throw new InvalidArgumentException( 
'$injectRecentChanges must be a bool' );
-               }
-
                $this->affectedPagesFinder = $affectedPagesFinder;
                $this->titleFactory = $titleFactory;
                $this->updater = $updater;
                $this->changeRunCoalescer = $changeRunCoalescer;
                $this->siteLookup = $siteLookup;
-               $this->repoId = $repoId;
-               $this->injectRecentChanges = $injectRecentChanges;
        }
 
        /**
diff --git a/client/includes/WikibaseClient.php 
b/client/includes/WikibaseClient.php
index 164f09f..8a250dc 100644
--- a/client/includes/WikibaseClient.php
+++ b/client/includes/WikibaseClient.php
@@ -1199,8 +1199,7 @@
                        new TitleFactory(),
                        $pageUpdater,
                        $changeListTransformer,
-                       $this->siteLookup,
-                       $this->settings->getSetting( 'injectRecentChanges' )
+                       $this->siteLookup
                );
        }
 
diff --git a/client/tests/phpunit/includes/Changes/ChangeHandlerTest.php 
b/client/tests/phpunit/includes/Changes/ChangeHandlerTest.php
index a3dc146..5857711 100644
--- a/client/tests/phpunit/includes/Changes/ChangeHandlerTest.php
+++ b/client/tests/phpunit/includes/Changes/ChangeHandlerTest.php
@@ -78,9 +78,7 @@
                        $titleFactory,
                        $updater ?: new MockPageUpdater(),
                        $this->getChangeRunCoalescer(),
-                       $this->getMock( SiteLookup::class ),
-                       'repowiki',
-                       true
+                       $this->getMock( SiteLookup::class )
                );
 
                return $handler;
diff --git a/docs/options.wiki b/docs/options.wiki
index f1905ca..3e8a570 100644
--- a/docs/options.wiki
+++ b/docs/options.wiki
@@ -106,8 +106,7 @@
 :;'prefixMapping': A prefix mapping array, see also: 
docs/foreign-entity-ids.wiki in the DataModel component.
 
 === Expert Settings ===
-;injectRecentChanges: Whether changes on the repository should be injected 
into this wiki's recent changes table, so they show up on watchlists, etc. 
Requires the <code>dispatchChanges.php</code> script to run, and this wiki to 
be listed in the <code>localClientDatabases</code> setting on the repository.
-;showExternalRecentChanges: Whether changes on the repository should be 
displayed on Special:RecentChanges, Special:Watchlist, etc on the client wiki. 
In contrast to <code>injectRecentChanges</code>, this setting just removes the 
changes from the user interface. The default is <code>false</code>. This is 
intended to temporarily prevent external changes from showing in order to find 
or fix some issue on a live site.
+;showExternalRecentChanges: Whether changes on the repository should be 
displayed on Special:RecentChanges, Special:Watchlist, etc on the client wiki.
 ;sendEchoNotification: If true, allows users on the client wiki to get a 
notification when a page they created is connected to a repo item. This 
requires the Echo extension.
 ;echoIcon: If <code>sendEchoNotification</code> is set to <code>true</code>, 
you can also provide what icon the user will see. The correct syntax is <code>[ 
'url' => '...' ]</code> or <code>[ 'path' => '...' ]</code> where 
<code>path</code> is relative to <code>$wgExtensionAssetsPath</code>. Defaults 
to <code>false</code> which means that there will be the default Echo icon.
 ;disabledUsageAspects: Array of usage aspects that should not be saved in the 
<code>wbc_entity_usage</code> table. This currently only supports aspect codes 
(like "T", "L" or "X"), but not full aspect keys (like "L.de").

-- 
To view, visit https://gerrit.wikimedia.org/r/370972
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I3d38a459460f19744fbfdb8ff31c0a9ededb8499
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Daniel Kinzler <daniel.kinz...@wikimedia.de>
Gerrit-Reviewer: Addshore <addshorew...@gmail.com>
Gerrit-Reviewer: Aude <aude.w...@gmail.com>
Gerrit-Reviewer: Thiemo Mättig (WMDE) <thiemo.maet...@wikimedia.de>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to