http://www.mediawiki.org/wiki/Special:Code/MediaWiki/84575
Revision: 84575
Author: reedy
Date: 2011-03-22 22:30:23 +0000 (Tue, 22 Mar 2011)
Log Message:
-----------
Followup r76344, fix another inversed logic
- if( !$item->userCan( $title, $wgUser, $action ) ) {
+ if( !$item->matches( $title, $action ) ) {
Fix some trailing whitespace also
Related to bug 27470 and bug 28166
Modified Paths:
--------------
trunk/extensions/TitleBlacklist/TitleBlacklist.list.php
Modified: trunk/extensions/TitleBlacklist/TitleBlacklist.list.php
===================================================================
--- trunk/extensions/TitleBlacklist/TitleBlacklist.list.php 2011-03-22
22:26:58 UTC (rev 84574)
+++ trunk/extensions/TitleBlacklist/TitleBlacklist.list.php 2011-03-22
22:30:23 UTC (rev 84575)
@@ -28,7 +28,6 @@
//Try to find something in the cache
$cachedBlacklist = $wgMemc->get( wfMemcKey(
"title_blacklist_entries" ) );
if( is_array( $cachedBlacklist ) && count( $cachedBlacklist ) >
0 && ( $cachedBlacklist[0]->getFormatVersion() == self::VERSION ) ) {
-
$this->mBlacklist = $cachedBlacklist;
wfProfileOut( __METHOD__ );
return;
@@ -147,7 +146,7 @@
}
/**
- * Check whether the blacklist restricts
+ * Check whether the blacklist restricts
* performing a specific action on the given Title
*
* @param $title Title to check
@@ -161,7 +160,7 @@
}
$blacklist = $this->getBlacklist();
foreach ( $blacklist as $item ) {
- if( !$item->matches( $title, $action ) ) {
+ if( $item->matches( $title, $action ) ) {
if( $this->isWhitelisted( $title, $action ) ) {
return false;
}
@@ -170,9 +169,9 @@
}
return false;
}
-
+
/**
- * Check whether it has been explicitly whitelisted that the
+ * Check whether it has been explicitly whitelisted that the
* current User may perform a specific action on the given Title
*
* @param $title Title to check
@@ -191,7 +190,7 @@
}
return false;
}
-
+
/**
* Get the current blacklist
*
@@ -203,7 +202,7 @@
}
return $this->mBlacklist;
}
-
+
/*
* Get the current whitelist
*
@@ -215,7 +214,7 @@
}
return $this->mWhitelist;
}
-
+
/**
* Get the text of a blacklist source via HTTP
*
@@ -235,7 +234,7 @@
}
return $result;
}
-
+
/**
* Invalidate the blacklist cache
*/
@@ -261,7 +260,7 @@
}
return $badEntries;
}
-
+
/**
* Inidcates whether user can override blacklist on certain action.
*
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs