Merge "HTML escape parameter 'text' of hook 'SkinEditSectionLinks'"
[lhc/web/wiklou.git] / includes / specials / SpecialWithoutinterwiki.php
index cca54b3..548e921 100644 (file)
@@ -22,6 +22,8 @@
  * @author Rob Church <robchur@gmail.com>
  */
 
+use MediaWiki\MediaWikiServices;
+
 /**
  * Special page lists pages without language links
  *
@@ -57,8 +59,8 @@ class WithoutInterwikiPage extends PageQueryPage {
                        ]
                ];
 
-               $htmlForm = HTMLForm::factory( 'inline', $formDescriptor, $this->getContext() );
-               $htmlForm->setWrapperLegendMsg( 'withoutinterwiki-legend' )
+               $htmlForm = HTMLForm::factory( 'ooui', $formDescriptor, $this->getContext() );
+               $htmlForm->setWrapperLegend( '' )
                        ->setSubmitTextMsg( 'withoutinterwiki-submit' )
                        ->setMethod( 'get' )
                        ->prepareForm()
@@ -91,13 +93,14 @@ class WithoutInterwikiPage extends PageQueryPage {
                        ],
                        'conds' => [
                                'll_title IS NULL',
-                               'page_namespace' => MWNamespace::getContentNamespaces(),
+                               'page_namespace' => MediaWikiServices::getInstance()->getNamespaceInfo()->
+                                       getContentNamespaces(),
                                'page_is_redirect' => 0
                        ],
                        'join_conds' => [ 'langlinks' => [ 'LEFT JOIN', 'll_from = page_id' ] ]
                ];
                if ( $this->prefix ) {
-                       $dbr = wfGetDB( DB_SLAVE );
+                       $dbr = wfGetDB( DB_REPLICA );
                        $query['conds'][] = 'page_title ' . $dbr->buildLike( $this->prefix, $dbr->anyString() );
                }