2007-07-19 12:40:05 +02:00
|
|
|
<?php
|
2008-01-08 07:41:55 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @package cms
|
|
|
|
* @subpackage
|
|
|
|
*/
|
|
|
|
|
2007-07-19 12:40:05 +02:00
|
|
|
class SSAkismet extends Akismet {
|
|
|
|
private static $apiKey;
|
2007-08-10 04:14:56 +02:00
|
|
|
private static $saveSpam = true;
|
2007-07-19 12:40:05 +02:00
|
|
|
|
|
|
|
static function setAPIKey($key) {
|
|
|
|
self::$apiKey = $key;
|
|
|
|
}
|
|
|
|
|
|
|
|
static function isEnabled() {
|
|
|
|
return (self::$apiKey != null) ? true : false;
|
|
|
|
}
|
|
|
|
|
|
|
|
static function setSaveSpam($save = true) {
|
|
|
|
SSAkismet::$saveSpam = $save;
|
|
|
|
}
|
|
|
|
|
|
|
|
static function getSaveSpam() {
|
|
|
|
return SSAkismet::$saveSpam;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function __construct() {
|
|
|
|
parent::__construct(Director::absoluteBaseURL(), self::$apiKey);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|