Merge "rdbms: add and enforce DB_REPLICA/DB_MASTER roles in DBConnRef"
[lhc/web/wiklou.git] / includes / specials / SpecialExpandTemplates.php
index 35344aa..9ea5e08 100644 (file)
@@ -56,6 +56,7 @@ class SpecialExpandTemplates extends SpecialPage {
                global $wgParser;
 
                $this->setHeaders();
+               $this->addHelpLink( 'Help:ExpandTemplates' );
 
                $request = $this->getRequest();
                $titleStr = $request->getText( 'wpContextTitle' );
@@ -114,8 +115,10 @@ class SpecialExpandTemplates extends SpecialPage {
                        }
 
                        $config = $this->getConfig();
-                       if ( $config->get( 'UseTidy' ) && $options->getTidy() ) {
+                       if ( MWTidy::isEnabled() && $options->getTidy() ) {
                                $tmp = MWTidy::tidy( $tmp );
+                       } else {
+                               wfDeprecated( 'disabling tidy', '1.33' );
                        }
 
                        $out->addHTML( $tmp );
@@ -151,7 +154,6 @@ class SpecialExpandTemplates extends SpecialPage {
         *
         * @param string $title Value for context title field
         * @param string $input Value for input textbox
-        * @return string
         */
        private function makeForm( $title, $input ) {
                $fields = [
@@ -163,7 +165,6 @@ class SpecialExpandTemplates extends SpecialPage {
                                'size' => 60,
                                'default' => $title,
                                'autofocus' => true,
-                               'cssclass' => 'mw-ui-input-inline',
                        ],
                        'input' => [
                                'type' => 'textarea',
@@ -172,11 +173,7 @@ class SpecialExpandTemplates extends SpecialPage {
                                'rows' => 10,
                                'default' => $input,
                                'id' => 'input',
-                               // The following classes can be used here:
-                               // * mw-editfont-monospace
-                               // * mw-editfont-sans-serif
-                               // * mw-editfont-serif
-                               'cssclass' => 'mw-editfont-' . $this->getUser()->getOption( 'editfont' ),
+                               'useeditfont' => true,
                        ],
                        'removecomments' => [
                                'type' => 'check',
@@ -208,8 +205,6 @@ class SpecialExpandTemplates extends SpecialPage {
                        ],
                ];
 
-               $this->getOutput()->addModuleStyles( 'mediawiki.editfont.styles' );
-
                $form = HTMLForm::factory( 'ooui', $fields, $this->getContext() );
                $form
                        ->setSubmitTextMsg( 'expand_templates_ok' )