2006-07-26 17:12:30 +00:00
|
|
|
<?php
|
2016-02-05 06:35:54 +00:00
|
|
|
|
2006-07-26 17:12:30 +00:00
|
|
|
/**
|
2016-02-05 06:35:54 +00:00
|
|
|
* CategoryTree extension, an AJAX based gadget
|
2006-07-26 17:12:30 +00:00
|
|
|
* to display the category structure of a wiki
|
|
|
|
*
|
2010-06-06 15:12:22 +00:00
|
|
|
* @file
|
|
|
|
* @ingroup Extensions
|
2007-03-13 11:39:12 +00:00
|
|
|
* @author Daniel Kinzler, brightbyte.de
|
2008-06-28 20:13:20 +00:00
|
|
|
* @copyright © 2006-2008 Daniel Kinzler and others
|
2018-04-13 22:19:35 +00:00
|
|
|
* @license GPL-2.0-or-later
|
2006-07-26 17:12:30 +00:00
|
|
|
*/
|
2008-02-04 09:22:12 +00:00
|
|
|
|
2016-02-05 06:35:54 +00:00
|
|
|
if ( function_exists( 'wfLoadExtension' ) ) {
|
|
|
|
wfLoadExtension( 'CategoryTree' );
|
|
|
|
// Keep i18n globals so mergeMessageFileList.php doesn't break
|
|
|
|
$wgMessagesDirs['CategoryTree'] = __DIR__ . '/i18n';
|
|
|
|
/* wfWarn(
|
2017-05-30 18:21:54 +00:00
|
|
|
'Deprecated PHP entry point used for CategoryTree extension. ' .
|
|
|
|
'Please use wfLoadExtension instead, ' .
|
2016-02-05 06:35:54 +00:00
|
|
|
'see https://www.mediawiki.org/wiki/Extension_registration for more details.'
|
|
|
|
); */
|
|
|
|
return true;
|
|
|
|
} else {
|
|
|
|
die( 'This version of the CategoryTree extension requires MediaWiki 1.25+' );
|
2006-07-26 17:12:30 +00:00
|
|
|
}
|
|
|
|
|
2016-02-05 06:35:54 +00:00
|
|
|
// To maintain compatibility with configuration we currently keep
|
|
|
|
// the defines, but there are deprecated, and we'll be removed in
|
|
|
|
// a future MediaWiki release, in addition to this file.
|
|
|
|
|
2006-07-26 17:12:30 +00:00
|
|
|
/**
|
2008-06-30 21:22:03 +00:00
|
|
|
* Constants for use with the mode,
|
2006-07-26 17:12:30 +00:00
|
|
|
* defining what should be shown in the tree
|
|
|
|
*/
|
2010-04-20 22:00:34 +00:00
|
|
|
define( 'CT_MODE_CATEGORIES', 0 );
|
|
|
|
define( 'CT_MODE_PAGES', 10 );
|
|
|
|
define( 'CT_MODE_ALL', 20 );
|
|
|
|
define( 'CT_MODE_PARENTS', 100 );
|
2006-07-26 17:12:30 +00:00
|
|
|
|
2008-06-30 21:22:03 +00:00
|
|
|
/**
|
|
|
|
* Constants for use with the hideprefix option,
|
|
|
|
* defining when the namespace prefix should be hidden
|
|
|
|
*/
|
2010-04-20 22:00:34 +00:00
|
|
|
define( 'CT_HIDEPREFIX_NEVER', 0 );
|
|
|
|
define( 'CT_HIDEPREFIX_ALWAYS', 10 );
|
|
|
|
define( 'CT_HIDEPREFIX_CATEGORIES', 20 );
|
|
|
|
define( 'CT_HIDEPREFIX_AUTO', 30 );
|