* Move the Preloader class into its own file + add $wgAutoloadClasses entry * Coding style tweaks, as per MediaWiki's coding conventions * Converted from PHP-based i18n to JSON i18n * Version 1.3 with the appropriate changelog entries and whatnot * Deprecated Preloader.php (but didn't fully remove it yet) in favor of extension.json -- MediaWiki 1.25 or newer is now required for this extension * Added myself into authors * Changed the Special:Version URL back to MediaWiki.org as it should be the canonical location for extension (and skin etc.) documentation; since this is an updated version of [[mw:Extension:Preloader]] it should be no problem to update that page to point to the correct repository etc. * Tweak the README file to account for new MW requirements + extension loading method * Fix $wgPreloaderSource so that it works again ( HT @legoktm )
25 lines
No EOL
814 B
PHP
25 lines
No EOL
814 B
PHP
<?php
|
|
|
|
/**
|
|
* Extension allows preloading of custom content into all edit forms
|
|
* when creating an article. <includeonly> and <noinclude> are respected
|
|
* and stripped during new article population.
|
|
*
|
|
* @file
|
|
* @ingroup Extensions
|
|
* @author Troy Engel <troyengel@gmail.com>
|
|
* @author Rob Church <robchur@gmail.com>
|
|
*/
|
|
|
|
if ( function_exists( 'wfLoadExtension' ) ) {
|
|
wfLoadExtension( 'Preloader' );
|
|
// Keep i18n globals so mergeMessageFileList.php doesn't break
|
|
$wgMessagesDirs['Preloader'] = __DIR__ . '/i18n';
|
|
wfWarn(
|
|
'Deprecated PHP entry point used for Preloader extension. Please use wfLoadExtension instead, ' .
|
|
'see https://www.mediawiki.org/wiki/Extension_registration for more details.'
|
|
);
|
|
return true;
|
|
} else {
|
|
die( 'This version of the Preloader extension requires MediaWiki 1.25+' );
|
|
} |