- if ( $wgTidyConfig !== null ) {
- $config = $wgTidyConfig;
- } elseif ( $wgUseTidy ) {
- // b/c configuration
- wfDeprecated( '$wgUseTidy', '1.26' );
- $config = [
- 'tidyConfigFile' => $wgTidyConf,
- 'debugComment' => $wgDebugTidy,
- 'tidyBin' => $wgTidyBin,
- 'tidyCommandLine' => $wgTidyOpts ];
- if ( $wgTidyInternal ) {
- if ( wfIsHHVM() ) {
- $config['driver'] = 'RaggettInternalHHVM';
- } else {
- $config['driver'] = 'RaggettInternalPHP';
- }
- } else {
- $config['driver'] = 'RaggettExternal';
- }
- } else {
- wfDeprecated( '$wgTidyConfig = null and $wgUseTidy = false', '1.26' );
- return false;
- }
- self::$instance = self::factory( $config );