X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;ds=sidebyside;f=includes%2Fparser%2FMWTidy.php;h=a73c28cdbacb6b822003abe8d4b49ee23b6cbc10;hb=62c36e82cf424f6ef51b524b2da41ff798111d83;hp=330859d4b575bdf930feeb1ed74fd050d94eb298;hpb=bc4417a522553d208767c7f42d70b42685c68051;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/parser/MWTidy.php b/includes/parser/MWTidy.php index 330859d4b5..a73c28cdba 100644 --- a/includes/parser/MWTidy.php +++ b/includes/parser/MWTidy.php @@ -52,27 +52,6 @@ class MWTidy { return $driver->tidy( $text ); } - /** - * Check HTML for errors, used if $wgValidateAllHtml = true. - * - * @param string $text - * @param string &$errorStr Return the error string - * @return bool Whether the HTML is valid - * @throws MWException - */ - public static function checkErrors( $text, &$errorStr = null ) { - $driver = self::singleton(); - if ( !$driver ) { - throw new MWException( __METHOD__ . - ': tidy is disabled, caller should have checked MWTidy::isEnabled()' ); - } - if ( $driver->supportsValidate() ) { - return $driver->validate( $text, $errorStr ); - } else { - throw new MWException( __METHOD__ . ": tidy driver does not support validate()" ); - } - } - /** * @return bool */ @@ -92,6 +71,7 @@ class MWTidy { $config = $wgTidyConfig; } elseif ( $wgUseTidy ) { // b/c configuration + wfDeprecated( '$wgUseTidy', '1.26' ); $config = [ 'tidyConfigFile' => $wgTidyConf, 'debugComment' => $wgDebugTidy, @@ -107,6 +87,7 @@ class MWTidy { $config['driver'] = 'RaggettExternal'; } } else { + wfDeprecated( '$wgTidyConfig = null and $wgUseTidy = false', '1.26' ); return false; } self::$instance = self::factory( $config ); @@ -132,12 +113,6 @@ class MWTidy { case 'RaggettExternal': $instance = new MediaWiki\Tidy\RaggettExternal( $config ); break; - case 'Html5Depurate': - $instance = new MediaWiki\Tidy\Html5Depurate( $config ); - break; - case 'Html5Internal': - $instance = new MediaWiki\Tidy\Html5Internal( $config ); - break; case 'RemexHtml': $instance = new MediaWiki\Tidy\RemexDriver( $config ); break;