From d417de70fcf39e0a7a15ba780b597914d16ca0f7 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Wed, 12 Mar 2014 18:12:23 +0100 Subject: Update to MediaWiki 1.22.4 --- extensions/SpamBlacklist/api/ApiSpamBlacklist.php | 78 ----------------------- 1 file changed, 78 deletions(-) delete mode 100644 extensions/SpamBlacklist/api/ApiSpamBlacklist.php (limited to 'extensions/SpamBlacklist/api/ApiSpamBlacklist.php') diff --git a/extensions/SpamBlacklist/api/ApiSpamBlacklist.php b/extensions/SpamBlacklist/api/ApiSpamBlacklist.php deleted file mode 100644 index dad9e8e0..00000000 --- a/extensions/SpamBlacklist/api/ApiSpamBlacklist.php +++ /dev/null @@ -1,78 +0,0 @@ -extractRequestParams(); - $matches = BaseBlacklist::getInstance( 'spam' )->filter( $params['url'], NULL, true ); - $res = $this->getResult(); - - if ( $matches !== false ) { - // this url is blacklisted. - $res->addValue( 'spamblacklist', 'result', 'blacklisted' ); - $res->setIndexedTagName( $matches, 'match' ); - $res->addValue( 'spamblacklist', 'matches', $matches ); - } else { - // not blacklisted - $res->addValue( 'spamblacklist', 'result', 'ok' ); - } - } - - public function getAllowedParams() { - return array( - 'url' => array( - ApiBase::PARAM_REQUIRED => true, - ApiBase::PARAM_ISMULTI => true, - ) - ); - } - - public function getParamDescription() { - return array( - 'url' => 'A pipe-separated list of URLs to validate against the blacklist', - ); - } - - public function getDescription() { - return 'Validate one or more URLs against the SpamBlacklist.'; - } - - public function getExamples() { - return array( - 'api.php?action=spamblacklist&url=http%3A%2F%2Fwww.example.com%2F%7Chttp%3A%2F%2Fwww.example.org%2F', - 'api.php?action=spamblacklist&url=https%3A%2F%2Fwww.example.net%2Findex.php', - ); - } - - public function getHelpUrls() { - return array( 'https://www.mediawiki.org/wiki/Extension:SpamBlacklist/API' ); - } -} -- cgit v1.2.3-54-g00ecf