47 if ( !$userId || ( $op !==
'|' && $op !==
'&' ) ) {
54 # To suppress, we OR the current bitfields with Revision::DELETED_USER
55 # to put a 1 in the username *_deleted bit. To unsuppress we AND the
56 # current bitfields with the inverse of Revision::DELETED_USER. The
57 # username bit is made to 0 (x & 0 = 0), while others are unchanged (x & 1 = x).
58 # The same goes for the sysop-restricted *_deleted bit.
59 $delUser = Revision::DELETED_USER | Revision::DELETED_RESTRICTED;
62 $delUser = $dbw->bitNot( $delUser );
63 $delAction = $dbw->bitNot( $delAction );
67 $userTitle = Title::makeTitleSafe( NS_USER, $name );
68 $userDbKey = $userTitle->getDBkey();
71 # Hide name from live edits
74 [ self::buildSetBitDeletedField(
'rev_deleted', $op, $delUser, $dbw ) ],
75 [
'rev_user' => $userId ],
78 # Hide name from deleted edits
81 [ self::buildSetBitDeletedField(
'ar_deleted', $op, $delUser, $dbw ) ],
82 [
'ar_user_text' => $name ],
89 [ self::buildSetBitDeletedField(
'log_deleted', $op, $delUser, $dbw ) ],
90 [
'log_user' => $userId,
'log_type != ' . $dbw->addQuotes(
'suppress' ) ],
97 [ self::buildSetBitDeletedField(
'rc_deleted', $op, $delUser, $dbw ) ],
98 [
'rc_user_text' => $name ],
102 # Hide name from live images
105 [ self::buildSetBitDeletedField(
'oi_deleted', $op, $delUser, $dbw ) ],
106 [
'oi_user_text' => $name ],
110 # Hide name from deleted images
113 [ self::buildSetBitDeletedField(
'fa_deleted', $op, $delUser, $dbw ) ],
114 [
'fa_user_text' => $name ],
120 $actorId = $dbw->selectField(
'actor',
'actor_id', [
'actor_name' => $name ], __METHOD__ );
122 # Hide name from live edits
123 $subquery = $dbw->selectSQLText(
124 'revision_actor_temp',
'revactor_rev', [
'revactor_actor' => $actorId ], __METHOD__
128 [ self::buildSetBitDeletedField(
'rev_deleted', $op, $delUser, $dbw ) ],
129 [
"rev_id IN ($subquery)" ],
132 # Hide name from deleted edits
135 [ self::buildSetBitDeletedField(
'ar_deleted', $op, $delUser, $dbw ) ],
136 [
'ar_actor' => $actorId ],
140 # Hide name from logs
143 [ self::buildSetBitDeletedField(
'log_deleted', $op, $delUser, $dbw ) ],
144 [
'log_actor' => $actorId,
'log_type != ' . $dbw->addQuotes(
'suppress' ) ],
151 [ self::buildSetBitDeletedField(
'rc_deleted', $op, $delUser, $dbw ) ],
152 [
'rc_actor' => $actorId ],
156 # Hide name from live images
159 [ self::buildSetBitDeletedField(
'oi_deleted', $op, $delUser, $dbw ) ],
160 [
'oi_actor' => $actorId ],
164 # Hide name from deleted images
167 [ self::buildSetBitDeletedField(
'fa_deleted', $op, $delUser, $dbw ) ],
168 [
'fa_actor' => $actorId ],
174 # Hide log entries pointing to the user page
177 [ self::buildSetBitDeletedField(
'log_deleted', $op, $delAction, $dbw ) ],
178 [
'log_namespace' => NS_USER,
'log_title' => $userDbKey,
179 'log_type != ' . $dbw->addQuotes(
'suppress' ) ],
183 # Hide RC entries pointing to the user page
186 [ self::buildSetBitDeletedField(
'rc_deleted', $op, $delAction, $dbw ) ],
187 [
'rc_namespace' => NS_USER,
'rc_title' => $userDbKey,
'rc_logid > 0' ],