2007-11-05 16:38:38 +00:00
|
|
|
<?php
|
|
|
|
if ( !defined( 'MEDIAWIKI' ) ) {
|
|
|
|
exit(1);
|
|
|
|
}
|
|
|
|
|
|
|
|
$wgExtensionCredits['other'][] = array(
|
2008-02-18 20:43:36 +00:00
|
|
|
'name' => 'Title Blacklist',
|
2008-08-08 23:26:44 +00:00
|
|
|
'author' => 'VasilievVV',
|
|
|
|
'version' => '1.4.1',
|
2008-02-18 20:43:36 +00:00
|
|
|
'url' => 'http://www.mediawiki.org/wiki/Extension:Title_Blacklist',
|
2008-08-08 23:26:44 +00:00
|
|
|
'description' => 'Allows to forbid creation of pages with specified titles',
|
2008-02-18 20:43:36 +00:00
|
|
|
'descriptionmsg' => 'titleblacklist-desc',
|
2007-11-05 16:38:38 +00:00
|
|
|
);
|
|
|
|
|
2007-12-26 16:50:58 +00:00
|
|
|
$wgExtensionMessagesFiles['TitleBlacklist'] = dirname( __FILE__ ) . '/TitleBlacklist.i18n.php';
|
2007-12-08 21:06:21 +00:00
|
|
|
$wgAutoloadClasses['TitleBlacklist'] = dirname( __FILE__ ) . '/TitleBlacklist.list.php';
|
|
|
|
$wgAutoloadClasses['TitleBlacklistHooks'] = dirname( __FILE__ ) . '/TitleBlacklist.hooks.php';
|
|
|
|
|
2008-08-08 23:26:44 +00:00
|
|
|
// Sources of TitleBlacklist
|
|
|
|
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
|
2007-12-09 12:15:13 +00:00
|
|
|
$wgTitleBlacklistSources = array();
|
2007-11-05 16:38:38 +00:00
|
|
|
|
2007-12-19 18:35:44 +00:00
|
|
|
$wgTitleBlacklistCaching = array(
|
|
|
|
'warningchance' => 100,
|
|
|
|
'expiry' => 900,
|
|
|
|
'warningexpiry' => 600,
|
|
|
|
);
|
|
|
|
|
2007-11-05 16:38:38 +00:00
|
|
|
$wgAvailableRights[] = 'tboverride';
|
|
|
|
$wgGroupPermissions['sysop']['tboverride'] = true;
|
|
|
|
|
2008-06-11 21:02:36 +00:00
|
|
|
$wgHooks['getUserPermissionsErrorsExpensive'][] = 'TitleBlacklistHooks::userCan';
|
|
|
|
$wgHooks['AbortMove'][] = 'TitleBlacklistHooks::abortMove';
|
|
|
|
$wgHooks['EditFilter'][] = 'TitleBlacklistHooks::validateBlacklist';
|
|
|
|
$wgHooks['ArticleSaveComplete'][] = 'TitleBlacklistHooks::clearBlacklist';
|
|
|
|
|
2007-12-08 21:06:21 +00:00
|
|
|
function efInitTitleBlacklist() {
|
|
|
|
global $wgTitleBlacklist;
|
2008-02-01 14:24:59 +00:00
|
|
|
if( isset( $wgTitleBlacklist ) && $wgTitleBlacklist ) return;
|
2007-12-08 21:06:21 +00:00
|
|
|
$wgTitleBlacklist = new TitleBlacklist();
|
|
|
|
}
|