diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-01 15:30:02 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-01 15:30:02 -0400 |
commit | 1de335ad3f395ca6861085393ba366a9e3fb4a0d (patch) | |
tree | f1fdd326034e05177596851be6a7127615d81498 /extensions/SpamBlacklist/BaseBlacklist.php | |
parent | 9c75fa8ff6d4d38ef552c00fef5969fb154765e8 (diff) | |
parent | f6d65e533c62f6deb21342d4901ece24497b433e (diff) |
Merge commit 'f6d65'
# Conflicts:
# skins/ArchLinux/ArchLinux.php
Diffstat (limited to 'extensions/SpamBlacklist/BaseBlacklist.php')
-rw-r--r-- | extensions/SpamBlacklist/BaseBlacklist.php | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/extensions/SpamBlacklist/BaseBlacklist.php b/extensions/SpamBlacklist/BaseBlacklist.php index 280a614a..b1958c35 100644 --- a/extensions/SpamBlacklist/BaseBlacklist.php +++ b/extensions/SpamBlacklist/BaseBlacklist.php @@ -87,11 +87,11 @@ abstract class BaseBlacklist { * * @param $type string Code for the blacklist * @return BaseBlacklist - * @throws MWException + * @throws Exception */ public static function getInstance( $type ) { if ( !isset( self::$blacklistTypes[$type] ) ) { - throw new MWException( "Invalid blacklist type '$type' passed to " . __METHOD__ ); + throw new Exception( "Invalid blacklist type '$type' passed to " . __METHOD__ ); } if ( !isset( self::$instances[$type] ) ) { @@ -223,15 +223,12 @@ abstract class BaseBlacklist { function getSharedBlacklists() { global $wgMemc, $wgDBname; $listType = $this->getBlacklistType(); - $fname = 'SpamBlacklist::getRegex'; - wfProfileIn( $fname ); wfDebugLog( 'SpamBlacklist', "Loading $listType regex..." ); if ( count( $this->files ) == 0 ){ # No lists wfDebugLog( 'SpamBlacklist', "no files specified\n" ); - wfProfileOut( $fname ); return array(); } @@ -240,7 +237,6 @@ abstract class BaseBlacklist { $cachedRegexes = $wgMemc->get( "$wgDBname:{$listType}_blacklist_regexes" ); if( is_array( $cachedRegexes ) ) { wfDebugLog( 'SpamBlacklist', "Got shared spam regexes from cache\n" ); - wfProfileOut( $fname ); return $cachedRegexes; } |