summaryrefslogtreecommitdiff
path: root/includes/revisiondelete/RevisionDeleteUser.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2013-01-18 16:46:04 +0100
committerPierre Schmitz <pierre@archlinux.de>2013-01-18 16:46:04 +0100
commit63601400e476c6cf43d985f3e7b9864681695ed4 (patch)
treef7846203a952e38aaf66989d0a4702779f549962 /includes/revisiondelete/RevisionDeleteUser.php
parent8ff01378c9e0207f9169b81966a51def645b6a51 (diff)
Update to MediaWiki 1.20.2
this update includes: * adjusted Arch Linux skin * updated FluxBBAuthPlugin * patch for https://bugzilla.wikimedia.org/show_bug.cgi?id=44024
Diffstat (limited to 'includes/revisiondelete/RevisionDeleteUser.php')
-rw-r--r--includes/revisiondelete/RevisionDeleteUser.php22
1 files changed, 14 insertions, 8 deletions
diff --git a/includes/revisiondelete/RevisionDeleteUser.php b/includes/revisiondelete/RevisionDeleteUser.php
index c88b4d91..c02e9c76 100644
--- a/includes/revisiondelete/RevisionDeleteUser.php
+++ b/includes/revisiondelete/RevisionDeleteUser.php
@@ -1,9 +1,6 @@
<?php
/**
- * Backend functions for suppressing and unsuppressing all references to a given user,
- * used when blocking with HideUser enabled. This was spun out of SpecialBlockip.php
- * in 1.18; at some point it needs to be rewritten to either use RevisionDelete abstraction,
- * or at least schema abstraction.
+ * Backend functions for suppressing and unsuppressing all references to a given user.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -23,6 +20,15 @@
* @file
* @ingroup RevisionDelete
*/
+
+/**
+ * Backend functions for suppressing and unsuppressing all references to a given user,
+ * used when blocking with HideUser enabled. This was spun out of SpecialBlockip.php
+ * in 1.18; at some point it needs to be rewritten to either use RevisionDelete abstraction,
+ * or at least schema abstraction.
+ *
+ * @ingroup RevisionDelete
+ */
class RevisionDeleteUser {
/**
@@ -30,14 +36,14 @@ class RevisionDeleteUser {
* @param $name String username
* @param $userId Int user id
* @param $op String operator '|' or '&'
- * @param $dbw null|Database, if you happen to have one lying around
+ * @param $dbw null|DatabaseBase, if you happen to have one lying around
* @return bool
*/
private static function setUsernameBitfields( $name, $userId, $op, $dbw ) {
- if( $op !== '|' && $op !== '&' ){
+ if ( !$userId || ( $op !== '|' && $op !== '&' ) ) {
return false; // sanity check
}
- if( !$dbw instanceof DatabaseBase ){
+ if ( !$dbw instanceof DatabaseBase ) {
$dbw = wfGetDB( DB_MASTER );
}
@@ -127,4 +133,4 @@ class RevisionDeleteUser {
public static function unsuppressUserName( $name, $userId, $dbw = null ) {
return self::setUsernameBitfields( $name, $userId, '&', $dbw );
}
-} \ No newline at end of file
+}