47 if ( !$userId || ( $op !==
'|' && $op !==
'&' ) ) {
54 # To suppress, we OR the current bitfields with RevisionRecord::DELETED_USER
55 # to put a 1 in the username *_deleted bit. To unsuppress we AND the
56 # current bitfields with the inverse of RevisionRecord::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 = RevisionRecord::DELETED_USER | RevisionRecord::DELETED_RESTRICTED;
62 $delUser = $dbw->bitNot( $delUser );
63 $delAction = $dbw->bitNot( $delAction );
68 $userDbKey = $userTitle->getDBkey();
70 $actorId = $dbw->selectField(
'actor',
'actor_id', [
'actor_name' => $name ], __METHOD__ );
72 # Hide name from live edits
73 $ids = $dbw->selectFieldValues(
74 'revision_actor_temp',
'revactor_rev', [
'revactor_actor' => $actorId ], __METHOD__
79 [ self::buildSetBitDeletedField(
'rev_deleted', $op, $delUser, $dbw ) ],
85 # Hide name from deleted edits
88 [ self::buildSetBitDeletedField(
'ar_deleted', $op, $delUser, $dbw ) ],
89 [
'ar_actor' => $actorId ],
96 [ self::buildSetBitDeletedField(
'log_deleted', $op, $delUser, $dbw ) ],
97 [
'log_actor' => $actorId,
'log_type != ' . $dbw->addQuotes(
'suppress' ) ],
104 [ self::buildSetBitDeletedField(
'rc_deleted', $op, $delUser, $dbw ) ],
105 [
'rc_actor' => $actorId ],
109 # Hide name from live images
112 [ self::buildSetBitDeletedField(
'oi_deleted', $op, $delUser, $dbw ) ],
113 [
'oi_actor' => $actorId ],
117 # Hide name from deleted images
120 [ self::buildSetBitDeletedField(
'fa_deleted', $op, $delUser, $dbw ) ],
121 [
'fa_actor' => $actorId ],
126 # Hide log entries pointing to the user page
129 [ self::buildSetBitDeletedField(
'log_deleted', $op, $delAction, $dbw ) ],
130 [
'log_namespace' =>
NS_USER,
'log_title' => $userDbKey,
131 'log_type != ' . $dbw->addQuotes(
'suppress' ) ],
135 # Hide RC entries pointing to the user page
138 [ self::buildSetBitDeletedField(
'rc_deleted', $op, $delAction, $dbw ) ],
139 [
'rc_namespace' =>
NS_USER,
'rc_title' => $userDbKey,
'rc_logid > 0' ],
147 return $field .
' = ' . ( $op ===
'&'
148 ? $dbw->
bitAnd( $field, $value )
149 : $dbw->
bitOr( $field, $value ) );