From acfa4e2f76720a327ca9d94d3724520705ac0ab9 Mon Sep 17 00:00:00 2001 From: DannyS712 Date: Sun, 21 Mar 2021 23:53:44 +0000 Subject: [PATCH] TitleFactory is not @newable, retrieve from MediaWikiServices For creation of MultiTitleFilter Change-Id: Ic527359d31fc0116a23c3173ba0f66f4bdfe3067 --- includes/EchoHooks.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/EchoHooks.php b/includes/EchoHooks.php index 988950b32..57518ada3 100644 --- a/includes/EchoHooks.php +++ b/includes/EchoHooks.php @@ -489,12 +489,14 @@ class EchoHooks implements RecentChange_saveHook { 'section' => 'echo/blocknotificationslist', 'filter' => MultiUsernameFilter::class, ]; + // TODO inject + $titleFactory = MediaWikiServices::getInstance()->getTitleFactory(); $preferences['echo-notifications-page-linked-title-muted-list'] = [ 'type' => 'titlesmultiselect', 'label-message' => 'echo-pref-notifications-page-linked-title-muted-list', 'section' => 'echo/mutedpageslist', 'showMissing' => false, - 'filter' => ( new MultiTitleFilter( new TitleFactory() ) ) + 'filter' => ( new MultiTitleFilter( $titleFactory ) ) ]; } }