X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialFileDuplicateSearch.php;h=6de127d3b820fb8162ce854f5074af9481960b2d;hb=c2e2afbc900dda1228f8ea6f5a3609d569fce00a;hp=68960d3aad9ed7317001b70177ce62a984be1f81;hpb=21463af0d8db7d7ea8e0e87e48e75cd3acb832b7;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialFileDuplicateSearch.php b/includes/specials/SpecialFileDuplicateSearch.php index 68960d3aad..6de127d3b8 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(). @@ -246,11 +246,11 @@ class FileDuplicateSearchPage extends QueryPage { // No prefix suggestion outside of file namespace return []; } - $search = SearchEngine::create(); - $search->setLimitOffset( $limit, $offset ); + $searchEngine = MediaWikiServices::getInstance()->newSearchEngine(); + $searchEngine->setLimitOffset( $limit, $offset ); // Autocomplete subpage the same as a normal search, but just for files - $search->setNamespaces( [ NS_FILE ] ); - $result = $search->defaultPrefixSearch( $search ); + $searchEngine->setNamespaces( [ NS_FILE ] ); + $result = $searchEngine->defaultPrefixSearch( $search ); return array_map( function ( Title $t ) { // Remove namespace in search suggestion