r65185 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r65184‎ | r65185 | r65186 >
Date:21:06, 17 April 2010
Author:platonides
Status:ok (Comments)
Tags:
Comment:
Add yet another parameter for Block construction, so this doesn't show runJobs.php blocking anyone when run from the job queue :)
Follow up r65184.
Modified paths:
  • /trunk/extensions/CentralAuth/CentralAuthUser.php (modified) (history)
  • /trunk/phase3/includes/Block.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Block.php
@@ -25,7 +25,7 @@
2626
2727 function __construct( $address = '', $user = 0, $by = 0, $reason = '',
2828 $timestamp = '' , $auto = 0, $expiry = '', $anonOnly = 0, $createAccount = 0, $enableAutoblock = 0,
29 - $hideName = 0, $blockEmail = 0, $allowUsertalk = 0 )
 29+ $hideName = 0, $blockEmail = 0, $allowUsertalk = 0, $byName = false )
3030 {
3131 $this->mId = 0;
3232 # Expand valid IPv6 addresses
@@ -45,7 +45,7 @@
4646 $this->mAllowUsertalk = $allowUsertalk;
4747 $this->mForUpdate = false;
4848 $this->mFromMaster = false;
49 - $this->mByName = false;
 49+ $this->mByName = $byName;
5050 $this->mAngryAutoblock = false;
5151 $this->initialiseRange();
5252 }
Index: trunk/extensions/CentralAuth/CentralAuthUser.php
@@ -1092,7 +1092,6 @@
10931093 /* $address */ $this->mName,
10941094 /* $user */ $data['id'],
10951095 /* $by */ 0,
1096 - //'ipb_by_text' => $by,
10971096 /* $reason */ $blockReason,
10981097 /* $timestamp */ wfTimestampNow(),
10991098 /* $auto */ false,
@@ -1102,7 +1101,8 @@
11031102 /* $enableAutoblock */ true,
11041103 /* $hideName (ipb_deleted) */ true,
11051104 /* $blockEmail */ true,
1106 - /* $allowUsertalk */ false
 1105+ /* $allowUsertalk */ false,
 1106+ /* $byName */ $by
11071107 );
11081108
11091109 # On normal block, BlockIp hook would be run here, but doing

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r65184Follow up r64982. Autoblocks aren't automatically set just by storing ipb_ena...platonides20:59, 17 April 2010

Comments

#Comment by 😂 (talk | contribs)   01:02, 5 December 2010

That constructor is disgusting :\

#Comment by Aaron Schulz (talk | contribs)   01:57, 5 December 2010

We need a $params array to the rescue :)

Status & tagging log