TitleFactory is not @newable, retrieve from MediaWikiServices

For creation of MultiTitleFilter

Change-Id: Ic527359d31fc0116a23c3173ba0f66f4bdfe3067
This commit is contained in:
DannyS712 2021-03-21 23:53:44 +00:00
parent 9b6b5ecbe0
commit acfa4e2f76

View file

@ -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 ) )
];
}
}