48 if ( !$userId || ( $op !==
'|' && $op !==
'&' ) ) {
55 # To suppress, we OR the current bitfields with Revision::DELETED_USER
56 # to put a 1 in the username *_deleted bit. To unsuppress we AND the
57 # current bitfields with the inverse of Revision::DELETED_USER. The
58 # username bit is made to 0 (x & 0 = 0), while others are unchanged (x & 1 = x).
59 # The same goes for the sysop-restricted *_deleted bit.
63 $delUser = $dbw->bitNot( $delUser );
64 $delAction = $dbw->bitNot( $delAction );
68 $userTitle = Title::makeTitleSafe( NS_USER, $name );
69 $userDbKey = $userTitle->getDBkey();
72 # Hide name from live edits
75 [ self::buildSetBitDeletedField(
'rev_deleted', $op, $delUser, $dbw ) ],
76 [
'rev_user' => $userId ],
79 # Hide name from deleted edits
82 [ self::buildSetBitDeletedField(
'ar_deleted', $op, $delUser, $dbw ) ],
83 [
'ar_user_text' => $name ],
90 [ self::buildSetBitDeletedField(
'log_deleted', $op, $delUser, $dbw ) ],
91 [
'log_user' => $userId,
'log_type != ' . $dbw->addQuotes(
'suppress' ) ],
98 [ self::buildSetBitDeletedField(
'rc_deleted', $op, $delUser, $dbw ) ],
99 [
'rc_user_text' => $name ],
103 # Hide name from live images
106 [ self::buildSetBitDeletedField(
'oi_deleted', $op, $delUser, $dbw ) ],
107 [
'oi_user_text' => $name ],
111 # Hide name from deleted images
114 [ self::buildSetBitDeletedField(
'fa_deleted', $op, $delUser, $dbw ) ],
115 [
'fa_user_text' => $name ],
121 $actorId = $dbw->selectField(
'actor',
'actor_id', [
'actor_name' => $name ], __METHOD__ );
123 # Hide name from live edits
124 $ids = $dbw->selectFieldValues(
125 'revision_actor_temp',
'revactor_rev', [
'revactor_actor' => $actorId ], __METHOD__
130 [ self::buildSetBitDeletedField(
'rev_deleted', $op, $delUser, $dbw ) ],
131 [
'rev_id' => $ids ],
136 # Hide name from deleted edits
139 [ self::buildSetBitDeletedField(
'ar_deleted', $op, $delUser, $dbw ) ],
140 [
'ar_actor' => $actorId ],
144 # Hide name from logs
147 [ self::buildSetBitDeletedField(
'log_deleted', $op, $delUser, $dbw ) ],
148 [
'log_actor' => $actorId,
'log_type != ' . $dbw->addQuotes(
'suppress' ) ],
155 [ self::buildSetBitDeletedField(
'rc_deleted', $op, $delUser, $dbw ) ],
156 [
'rc_actor' => $actorId ],
160 # Hide name from live images
163 [ self::buildSetBitDeletedField(
'oi_deleted', $op, $delUser, $dbw ) ],
164 [
'oi_actor' => $actorId ],
168 # Hide name from deleted images
171 [ self::buildSetBitDeletedField(
'fa_deleted', $op, $delUser, $dbw ) ],
172 [
'fa_actor' => $actorId ],
178 # Hide log entries pointing to the user page
181 [ self::buildSetBitDeletedField(
'log_deleted', $op, $delAction, $dbw ) ],
182 [
'log_namespace' => NS_USER,
'log_title' => $userDbKey,
183 'log_type != ' . $dbw->addQuotes(
'suppress' ) ],
187 # Hide RC entries pointing to the user page
190 [ self::buildSetBitDeletedField(
'rc_deleted', $op, $delAction, $dbw ) ],
191 [
'rc_namespace' => NS_USER,
'rc_title' => $userDbKey,
'rc_logid > 0' ],