2004-12-11 09:59:06 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
# Loader for spam blacklist feature
|
|
|
|
# Include this from LocalSettings.php
|
|
|
|
|
2007-11-12 07:44:17 +00:00
|
|
|
if ( !defined( 'MEDIAWIKI' ) ) {
|
|
|
|
exit;
|
|
|
|
}
|
2004-12-11 09:59:06 +00:00
|
|
|
|
2010-12-20 04:05:54 +00:00
|
|
|
$wgExtensionCredits[version_compare($wgVersion, '1.17alpha', '>=') ? 'antispam' : 'other'][] = array(
|
2009-04-27 04:45:10 +00:00
|
|
|
'path' => __FILE__,
|
2008-02-16 20:47:29 +00:00
|
|
|
'name' => 'SpamBlacklist',
|
2012-01-18 23:29:37 +00:00
|
|
|
'author' => array( 'Tim Starling', 'John Du Hart' ),
|
2011-12-13 23:49:33 +00:00
|
|
|
'url' => 'https://www.mediawiki.org/wiki/Extension:SpamBlacklist',
|
2008-02-16 20:47:29 +00:00
|
|
|
'descriptionmsg' => 'spam-blacklist-desc',
|
|
|
|
);
|
|
|
|
|
|
|
|
$dir = dirname(__FILE__) . '/';
|
|
|
|
$wgExtensionMessagesFiles['SpamBlackList'] = $dir . 'SpamBlacklist.i18n.php';
|
|
|
|
|
2007-11-12 07:44:17 +00:00
|
|
|
/**
|
2012-01-17 06:13:46 +00:00
|
|
|
* Array of settings for blacklist classes
|
2007-11-12 07:44:17 +00:00
|
|
|
*/
|
2012-01-17 06:13:46 +00:00
|
|
|
$wgBlacklistSettings = array(
|
|
|
|
'spam' => array(
|
|
|
|
'files' => array(),
|
|
|
|
),
|
|
|
|
);
|
2007-06-29 01:36:09 +00:00
|
|
|
|
2007-07-20 21:13:26 +00:00
|
|
|
/**
|
2012-01-17 06:13:46 +00:00
|
|
|
* @deprecated
|
2007-11-12 07:44:17 +00:00
|
|
|
*/
|
2012-01-17 06:13:46 +00:00
|
|
|
$wgSpamBlacklistFiles =& $wgBlacklistSettings['spam']['files'];
|
2008-11-02 22:40:02 +00:00
|
|
|
|
|
|
|
/**
|
2012-01-17 06:13:46 +00:00
|
|
|
* @deprecated
|
2008-11-02 22:40:02 +00:00
|
|
|
*/
|
2012-01-17 06:13:46 +00:00
|
|
|
$wgSpamBlacklistSettings =& $wgBlacklistSettings['spam'];
|
|
|
|
|
|
|
|
$wgHooks['EditFilterMerged'][] = 'SpamBlacklistHooks::filterMerged';
|
|
|
|
$wgHooks['APIEditBeforeSave'][] = 'SpamBlacklistHooks::filterAPIEditBeforeSave';
|
|
|
|
$wgHooks['EditFilter'][] = 'SpamBlacklistHooks::validate';
|
|
|
|
$wgHooks['ArticleSaveComplete'][] = 'SpamBlacklistHooks::articleSave';
|
2012-01-18 23:29:37 +00:00
|
|
|
$wgHooks['UserCanSendEmail'][] = 'SpamBlacklistHooks::userCanSendEmail';
|
|
|
|
$wgHooks['AbortNewAccount'][] = 'SpamBlacklistHooks::abortNewAccount';
|
2012-01-17 06:13:46 +00:00
|
|
|
|
|
|
|
$wgAutoloadClasses['BaseBlacklist'] = $dir . 'BaseBlacklist.php';
|
2012-01-18 23:29:37 +00:00
|
|
|
$wgAutoloadClasses['EmailBlacklist'] = $dir . 'EmailBlacklist.php';
|
2012-01-17 06:13:46 +00:00
|
|
|
$wgAutoloadClasses['SpamBlacklistHooks'] = $dir . 'SpamBlacklistHooks.php';
|
|
|
|
$wgAutoloadClasses['SpamBlacklist'] = $dir . 'SpamBlacklist_body.php';
|
|
|
|
$wgAutoloadClasses['SpamRegexBatch'] = $dir . 'SpamRegexBatch.php';
|
2007-11-12 07:44:17 +00:00
|
|
|
|
2007-07-20 21:13:26 +00:00
|
|
|
|
2007-12-16 18:27:23 +00:00
|
|
|
|