45 if ( !$userId || ( $op !==
'|' && $op !==
'&' ) ) {
52 # To suppress, we OR the current bitfields with Revision::DELETED_USER
53 # to put a 1 in the username *_deleted bit. To unsuppress we AND the
54 # current bitfields with the inverse of Revision::DELETED_USER. The
55 # username bit is made to 0 (x & 0 = 0), while others are unchanged (x & 1 = x).
56 # The same goes for the sysop-restricted *_deleted bit.
60 $delUser = $dbw->bitNot( $delUser );
61 $delAction = $dbw->bitNot( $delAction );
66 $userDbKey = $userTitle->getDBkey();
68 # Hide name from live edits
71 [ self::buildSetBitDeletedField(
'rev_deleted', $op, $delUser, $dbw ) ],
72 [
'rev_user' => $userId ],
75 # Hide name from deleted edits
78 [ self::buildSetBitDeletedField(
'ar_deleted', $op, $delUser, $dbw ) ],
79 [
'ar_user_text' =>
$name ],
86 [ self::buildSetBitDeletedField(
'log_deleted', $op, $delUser, $dbw ) ],
87 [
'log_user' => $userId,
'log_type != ' . $dbw->addQuotes(
'suppress' ) ],
92 [ self::buildSetBitDeletedField(
'log_deleted', $op, $delAction, $dbw ) ],
93 [
'log_namespace' =>
NS_USER,
'log_title' => $userDbKey,
94 'log_type != ' . $dbw->addQuotes(
'suppress' ) ],
101 [ self::buildSetBitDeletedField(
'rc_deleted', $op, $delUser, $dbw ) ],
102 [
'rc_user_text' =>
$name ],
107 [ self::buildSetBitDeletedField(
'rc_deleted', $op, $delAction, $dbw ) ],
108 [
'rc_namespace' =>
NS_USER,
'rc_title' => $userDbKey,
'rc_logid > 0' ],
112 # Hide name from live images
115 [ self::buildSetBitDeletedField(
'oi_deleted', $op, $delUser, $dbw ) ],
116 [
'oi_user_text' =>
$name ],
120 # Hide name from deleted images
123 [ self::buildSetBitDeletedField(
'fa_deleted', $op, $delUser, $dbw ) ],
124 [
'fa_user_text' =>
$name ],
132 return $field .
' = ' . ( $op ===
'&'
133 ? $dbw->bitAnd( $field,
$value )
134 : $dbw->bitOr( $field,
$value ) );