X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialFileDuplicateSearch.php;h=8021bc2c3af751b57d1e98bb5d05ca0a8db72c74;hb=6314a9026f9b404928e96a883c6ace7e491e891b;hp=20c0762bb9a68b904ed015a374d123c4586b8202;hpb=6a4214dc89ced2563755fa4ba25d0ed3ad22550d;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialFileDuplicateSearch.php b/includes/specials/SpecialFileDuplicateSearch.php index 20c0762bb9..8021bc2c3a 100644 --- a/includes/specials/SpecialFileDuplicateSearch.php +++ b/includes/specials/SpecialFileDuplicateSearch.php @@ -1,4 +1,6 @@ 'filename', 'size' => 50, 'value' => $this->filename, - 'cssclass' => 'mw-ui-input-inline' ], ]; $hiddenFields = [ 'title' => $this->getPageTitle()->getPrefixedDBkey(), ]; - $htmlForm = HTMLForm::factory( 'inline', $formFields, $this->getContext() ); + $htmlForm = HTMLForm::factory( 'ooui', $formFields, $this->getContext() ); $htmlForm->addHiddenFields( $hiddenFields ); $htmlForm->setAction( wfScript() ); $htmlForm->setMethod( 'get' ); $htmlForm->setSubmitProgressive(); $htmlForm->setSubmitTextMsg( $this->msg( 'fileduplicatesearch-submit' ) ); - $htmlForm->setWrapperLegendMsg( 'fileduplicatesearch-legend' ); // The form should be visible always, even if it was submitted (e.g. to perform another action). // To bypass the callback validation of HTMLForm, use prepareForm() and displayForm(). @@ -208,11 +208,12 @@ class FileDuplicateSearchPage extends QueryPage { function formatResult( $skin, $result ) { global $wgContLang; + $linkRenderer = $this->getLinkRenderer(); $nt = $result->getTitle(); $text = $wgContLang->convert( $nt->getText() ); - $plink = Linker::link( + $plink = $linkRenderer->makeLink( $nt, - htmlspecialchars( $text ) + $text ); $userText = $result->getUser( 'text' ); @@ -246,7 +247,7 @@ class FileDuplicateSearchPage extends QueryPage { // No prefix suggestion outside of file namespace return []; } - $searchEngine = SearchEngine::create(); + $searchEngine = MediaWikiServices::getInstance()->newSearchEngine(); $searchEngine->setLimitOffset( $limit, $offset ); // Autocomplete subpage the same as a normal search, but just for files $searchEngine->setNamespaces( [ NS_FILE ] );