-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
switch to extension registration, proper i18n
- Loading branch information
1 parent
fc5a159
commit 8ba71ea
Showing
3 changed files
with
33 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,14 @@ | ||
<?php | ||
/** | ||
* @author Jean-Lou Dupont | ||
* @author Jamesmontalvo3 | ||
* @package HeaderFooter | ||
* @version 2.1.1 | ||
*/ | ||
|
||
# Credits | ||
$GLOBALS['wgExtensionCredits']['other'][] = array( | ||
'name' => 'HeaderFooter', | ||
'version' => '2.1.1', | ||
'author' => 'Jean-Lou Dupont, James Montalvo, Douglas Mason', | ||
'description' => 'Enables per-page/per-namespace headers and footers', | ||
'url' => 'http://mediawiki.org/wiki/Extension:HeaderFooter', | ||
); | ||
|
||
# Hooks | ||
$GLOBALS['wgHooks']['OutputPageParserOutput'][] = 'HeaderFooter::hOutputPageParserOutput'; | ||
|
||
# Autoload | ||
$GLOBALS['wgAutoloadClasses']['HeaderFooter'] = __DIR__ . '/HeaderFooter.class.php'; | ||
if ( function_exists( 'wfLoadExtension' ) ) { | ||
wfLoadExtension( 'HeaderFooter' ); | ||
// Keep i18n globals so mergeMessageFileList.php doesn't break | ||
$wgMessagesDirs['HeaderFooter'] = __DIR__ . '/i18n'; | ||
wfWarn( | ||
'Deprecated PHP entry point used for HeaderFooter extension. ' . | ||
'Please use wfLoadExtension instead, ' . | ||
'see https://www.mediawiki.org/wiki/Extension_registration for more details.' | ||
); | ||
return; | ||
} else { | ||
die( 'This version of the HeaderFooter extension requires MediaWiki 1.25+' ); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"name": "HeaderFooter", | ||
"version": "3.0.0", | ||
"author": "Jean-Lou Dupont, James Montalvo, Douglas Mason", | ||
"url": "http://mediawiki.org/wiki/Extension:HeaderFooter", | ||
"descriptionmsg": "headerfooter-desc", | ||
"type": "other", | ||
"AutoloadClasses": { | ||
"HeaderFooter": "HeaderFooter.class.php" | ||
}, | ||
"Hooks": { | ||
"OutputPageParserOutput": [ | ||
"HeaderFooter::hOutputPageParserOutput" | ||
] | ||
}, | ||
"manifest_version": 1 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"headerfooter-desc": "Enables per-page/per-namespace headers and footers" | ||
} |