mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/RelatedArticles
synced 2024-11-30 19:14:49 +00:00
7995ce4a42
Add extension.json and populate it with information from both RelatedArticles.php and the RelatedArticles extension wiki page [0]. Migrate the hook handlers to static functions operating on static data rather than having a single, global instance of RelatedArticles so that the hook handler definitions can be added to extension.json easily. N.B. During testing the handlers for both the SkinBuildSidebar and SkinTemplateToolboxEnd appeared to have the same effect so the TODO was removed but not the handler for the former. Additional changes include: * RelatedArticles.class.php -> includes/RelatedArticles.php * RelatedArticles -> RelatedArticles\Hooks * Documenting all of the methods of RelatedArticles\Hooks [0] https://www.mediawiki.org/wiki/Extension:RelatedArticles Bug: T87965 Change-Id: I9944b9186746386ee18ca28657bb547c00ae2b8c
16 lines
618 B
PHP
16 lines
618 B
PHP
<?php
|
|
if ( function_exists( 'wfLoadExtension' ) ) {
|
|
wfLoadExtension( 'RelatedArticles' );
|
|
// Keep i18n globals so mergeMessageFileList.php doesn't break
|
|
$wgMessagesDirs['RelatedArticles'] = __DIR__ . '/i18n';
|
|
$wgExtensionMessagesFiles['RelatedArticlesMagic'] = __DIR__ . '/RelatedArticles.i18n.magic.php';
|
|
wfWarn(
|
|
'Deprecated PHP entry point used for RelatedArticles extension. ' .
|
|
'Please use wfLoadExtension instead, see ' .
|
|
'https://www.mediawiki.org/wiki/Extension_registration for more details.'
|
|
);
|
|
return;
|
|
} else {
|
|
die( 'This version of the RelatedArticles extension requires MediaWiki 1.25+' );
|
|
}
|