2011-06-09 21:50:45 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Helper to load syntax-highlighting editor for JavaScript and CSS pages
|
|
|
|
* on-wiki.
|
|
|
|
*
|
|
|
|
* Extends and requires WikiEditor extension.
|
|
|
|
*
|
|
|
|
* Extension code is GPLv2 following MediaWiki base.
|
|
|
|
* Ace editor JS code follows its own license, see in the 'ace' subdir.
|
|
|
|
*/
|
|
|
|
|
2015-03-03 01:55:52 +00:00
|
|
|
/**
|
2015-10-25 12:09:56 +00:00
|
|
|
* This PHP entry point is deprecated.
|
|
|
|
* Please use wfLoadExtension() and the extension.json file instead.
|
2015-03-03 01:55:52 +00:00
|
|
|
* See https://www.mediawiki.org/wiki/Manual:Extension_registration for more details.
|
|
|
|
*/
|
|
|
|
|
2015-05-26 20:19:52 +00:00
|
|
|
if ( function_exists( 'wfLoadExtension' ) ) {
|
|
|
|
wfLoadExtension( 'CodeEditor' );
|
|
|
|
// Keep i18n globals so mergeMessageFileList.php doesn't break
|
|
|
|
$wgMessagesDirs['CodeEditor'] = __DIR__ . '/i18n';
|
|
|
|
/* wfWarn(
|
2015-10-25 12:09:56 +00:00
|
|
|
'Deprecated PHP entry point used for CodeEditor extension. ' .
|
|
|
|
'Please use wfLoadExtension instead, ' .
|
2015-05-26 20:19:52 +00:00
|
|
|
'see https://www.mediawiki.org/wiki/Extension_registration for more details.'
|
|
|
|
); */
|
|
|
|
return;
|
|
|
|
} else {
|
|
|
|
die( 'This version of the CodeEditor extension requires MediaWiki 1.25+' );
|
|
|
|
}
|