mediawiki-extensions-TitleB.../TitleBlacklist.php

63 lines
1.9 KiB
PHP
Raw Normal View History

<?php
if ( !defined( 'MEDIAWIKI' ) ) {
exit(1);
}
2008-08-09 01:54:39 +00:00
//@{
/**
* @package MediaWiki
* @subpackage Extensions
*/
$wgExtensionCredits['other'][] = array(
'path' => __FILE__,
'name' => 'Title Blacklist',
2008-08-09 01:54:39 +00:00
'author' => array( 'VasilievVV', 'Fran Rogers' ),
'version' => '1.4.2',
'url' => 'http://www.mediawiki.org/wiki/Extension:Title_Blacklist',
'descriptionmsg' => 'titleblacklist-desc',
);
$wgExtensionMessagesFiles['TitleBlacklist'] = dirname( __FILE__ ) . '/TitleBlacklist.i18n.php';
$wgAutoloadClasses['TitleBlacklist'] = dirname( __FILE__ ) . '/TitleBlacklist.list.php';
$wgAutoloadClasses['TitleBlacklistHooks'] = dirname( __FILE__ ) . '/TitleBlacklist.hooks.php';
2008-08-09 01:54:39 +00:00
/** @defgroup Title blacklist source types
* @{
*/
define( 'TBLSRC_MSG', 0 ); ///< For internal usage
define( 'TBLSRC_LOCALPAGE', 1 ); ///< Local wiki page
define( 'TBLSRC_URL', 2 ); ///< Load blacklist from URL
define( 'TBLSRC_FILE', 3 ); ///< Load from file
/** @} */
/** Array of title blacklist sources */
$wgTitleBlacklistSources = array();
2007-12-19 18:35:44 +00:00
$wgTitleBlacklistCaching = array(
'warningchance' => 100,
'expiry' => 900,
'warningexpiry' => 600,
);
$wgAvailableRights[] = 'tboverride';
$wgGroupPermissions['sysop']['tboverride'] = true;
$wgHooks['getUserPermissionsErrorsExpensive'][] = 'TitleBlacklistHooks::userCan';
$wgHooks['AbortMove'][] = 'TitleBlacklistHooks::abortMove';
2008-08-09 01:54:39 +00:00
$wgHooks['AbortNewAccount'][] = 'TitleBlacklistHooks::abortNewAccount';
$wgHooks['CentralAuthAutoCreate'][] = 'TitleBlacklistHooks::centralAuthAutoCreate';
$wgHooks['EditFilter'][] = 'TitleBlacklistHooks::validateBlacklist';
$wgHooks['ArticleSaveComplete'][] = 'TitleBlacklistHooks::clearBlacklist';
2008-08-09 01:54:39 +00:00
/**
* Initialize the title blacklist
*/
function efInitTitleBlacklist() {
global $wgTitleBlacklist;
2008-02-01 14:24:59 +00:00
if( isset( $wgTitleBlacklist ) && $wgTitleBlacklist ) return;
$wgTitleBlacklist = new TitleBlacklist();
}
2008-08-09 01:54:39 +00:00
//@}