mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CategoryTree
synced 2024-11-27 09:43:06 +00:00
* Babel, CategoryTree, MagicNoNumberedHeadings, RegexFunctions and SmoothGallery: new style magic words
* MagicNoNumberedHeadings: add extension description in i18n file, reindent * bump versions where applicable
This commit is contained in:
parent
c1a5082691
commit
cd5deee70b
15
CategoryTree.i18n.magic.php
Normal file
15
CategoryTree.i18n.magic.php
Normal file
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
/**
|
||||
* Internationalisation file for extension CategoryTree.
|
||||
*
|
||||
* @addtogroup Extensions
|
||||
* @author Daniel Kinzler, brightbyte.de
|
||||
* @copyright © 2006-2008 Daniel Kinzler
|
||||
* @license GNU General Public Licence 2.0 or later
|
||||
*/
|
||||
|
||||
$magicWords = array();
|
||||
|
||||
$magicWords['en'] = array(
|
||||
'categorytree' => array( 0, 'categorytree' ),
|
||||
);
|
|
@ -129,6 +129,11 @@ $wgExtensionCredits['parserhook'][] = array(
|
|||
* Register the special page
|
||||
*/
|
||||
$dir = dirname(__FILE__) . '/';
|
||||
|
||||
if ( $wgUseAjax && $wgCategoryTreeAllowTag ) {
|
||||
$wgExtensionMessagesFiles['CategoryTreeMagic'] = $dir . 'CategoryTree.i18n.magic.php';
|
||||
}
|
||||
|
||||
$wgExtensionMessagesFiles['CategoryTree'] = $dir . 'CategoryTree.i18n.php';
|
||||
$wgAutoloadClasses['CategoryTreePage'] = $dir . 'CategoryTreePage.php';
|
||||
$wgAutoloadClasses['CategoryTree'] = $dir . 'CategoryTreeFunctions.php';
|
||||
|
@ -137,7 +142,6 @@ $wgSpecialPages['CategoryTree'] = 'CategoryTreePage';
|
|||
$wgSpecialPageGroups['CategoryTree'] = 'pages';
|
||||
#$wgHooks['SkinTemplateTabs'][] = 'efCategoryTreeInstallTabs';
|
||||
$wgHooks['ArticleFromTitle'][] = 'efCategoryTreeArticleFromTitle';
|
||||
$wgHooks['LanguageGetMagic'][] = 'efCategoryTreeGetMagic';
|
||||
|
||||
/**
|
||||
* register Ajax function
|
||||
|
@ -205,20 +209,6 @@ function efCategoryTreeSetHooks() {
|
|||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Hook magic word
|
||||
*/
|
||||
function efCategoryTreeGetMagic( &$magicWords, $langCode ) {
|
||||
global $wgUseAjax, $wgCategoryTreeAllowTag;
|
||||
|
||||
if ( $wgUseAjax && $wgCategoryTreeAllowTag ) {
|
||||
//XXX: should we allow a local alias?
|
||||
$magicWords['categorytree'] = array( 0, 'categorytree' );
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Entry point for Ajax, registered in $wgAjaxExportList.
|
||||
* The $enc parameter determins how the $options is decoded into a PHP array.
|
||||
|
|
Loading…
Reference in a new issue