Index: trunk/phase3/includes/specials/SpecialBlockip.php |
— | — | @@ -497,16 +497,17 @@ |
498 | 498 | } |
499 | 499 | |
500 | 500 | private function setUsernameBitfields( $name, $userId, $op ) { |
501 | | - if( $op !== '|' && $op !== '&' ) |
502 | | - return false; // sanity check |
| 501 | + if( $op !== '|' && $op !== '&' ) return false; // sanity check |
503 | 502 | $dbw = wfGetDB( DB_MASTER ); |
504 | 503 | $delUser = Revision::DELETED_USER | Revision::DELETED_RESTRICTED; |
| 504 | + $delAction = LogPage::DELETED_ACTION | Revision::DELETED_RESTRICTED; |
505 | 505 | # To suppress, we OR the current bitfields with Revision::DELETED_USER |
506 | 506 | # to put a 1 in the username *_deleted bit. To unsuppress we AND the |
507 | 507 | # current bitfields with the inverse of Revision::DELETED_USER. The |
508 | 508 | # username bit is made to 0 (x & 0 = 0), while others are unchanged (x & 1 = x). |
509 | 509 | # The same goes for the sysop-restricted *_deleted bit. |
510 | 510 | if( $op == '&' ) $delUser = "~{$delUser}"; |
| 511 | + if( $op == '&' ) $delAction = "~{$delAction}"; |
511 | 512 | # Hide name from live edits |
512 | 513 | $dbw->update( 'revision', array("rev_deleted = rev_deleted $op $delUser"), |
513 | 514 | array('rev_user' => $userId), __METHOD__ ); |
— | — | @@ -516,6 +517,8 @@ |
517 | 518 | # Hide name from logs |
518 | 519 | $dbw->update( 'logging', array("log_deleted = log_deleted $op $delUser"), |
519 | 520 | array('log_user' => $userId), __METHOD__ ); |
| 521 | + $dbw->update( 'logging', array("log_deleted = log_deleted $op $delAction"), |
| 522 | + array('log_namespace' => NS_USER, 'log_title' => $name), __METHOD__ ); |
520 | 523 | # Hide name from RC |
521 | 524 | $dbw->update( 'recentchanges', array("rc_deleted = rc_deleted $op $delUser"), |
522 | 525 | array('rc_user_text' => $name), __METHOD__ ); |