2009-02-03 22:29:55 +01:00
|
|
|
<?php
|
2009-09-17 06:06:53 +02:00
|
|
|
|
2009-02-03 22:29:55 +01:00
|
|
|
/**
|
2009-08-11 04:51:03 +02:00
|
|
|
* @package spamprotection
|
2014-02-10 08:53:59 +01:00
|
|
|
*
|
|
|
|
* @deprecated 1.0
|
2009-02-03 22:29:55 +01:00
|
|
|
*/
|
2009-08-11 04:51:03 +02:00
|
|
|
|
2009-06-05 00:57:33 +02:00
|
|
|
class SpamProtectorManager {
|
2009-02-03 22:29:55 +01:00
|
|
|
|
2009-09-17 06:06:53 +02:00
|
|
|
private static $spam_protector = null;
|
2014-02-10 08:53:59 +01:00
|
|
|
|
2009-09-17 06:06:53 +02:00
|
|
|
public static function set_spam_protector($protector) {
|
2014-02-10 08:53:59 +01:00
|
|
|
Deprecation::notice('1.1',
|
|
|
|
'SpamProtectorManager::set_spam_protector() is deprecated. '.
|
|
|
|
'Use the new config system. FormSpamProtectorExtension.default_spam_protector'
|
|
|
|
);
|
|
|
|
|
2009-06-05 00:57:33 +02:00
|
|
|
self::$spam_protector = $protector;
|
2009-02-03 22:29:55 +01:00
|
|
|
}
|
2014-02-10 08:53:59 +01:00
|
|
|
|
2009-09-17 06:06:53 +02:00
|
|
|
public static function get_spam_protector() {
|
2014-02-10 08:53:59 +01:00
|
|
|
Deprecation::notice('1.1',
|
|
|
|
'SpamProtectorManager::get_spam_protector() is deprecated'.
|
|
|
|
'Use the new config system. FormSpamProtectorExtension.default_spam_protector');
|
|
|
|
|
2009-06-05 00:57:33 +02:00
|
|
|
return self::$spam_protector;
|
2009-03-25 03:14:26 +01:00
|
|
|
}
|
|
|
|
|
2014-02-10 08:53:59 +01:00
|
|
|
public static function update_form($form, $before = null, $fieldsToSpamServiceMapping = array(), $title = null, $rightTitle = null) {
|
|
|
|
Deprecation::notice('1.1',
|
|
|
|
'SpamProtectorManager::update_form is deprecated'.
|
|
|
|
'Please use $form->enableSpamProtection() for adding spamprotection'
|
|
|
|
);
|
|
|
|
|
|
|
|
return $form->enableSpamProtection();
|
2009-02-16 01:28:53 +01:00
|
|
|
}
|
2009-09-17 06:06:53 +02:00
|
|
|
}
|