X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialFileDuplicateSearch.php;h=8021bc2c3af751b57d1e98bb5d05ca0a8db72c74;hb=943a2498d0d081fc057898d594dcd57f5762d3ab;hp=20c0762bb9a68b904ed015a374d123c4586b8202;hpb=8eac2feedb7ee093d2c48504e1eb2b8a9dbc8452;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 ] );