Index: trunk/phase3/includes/LogPage.php |
— | — | @@ -35,7 +35,7 @@ |
36 | 36 | const DELETED_USER = 4; |
37 | 37 | const DELETED_RESTRICTED = 8; |
38 | 38 | /* @access private */ |
39 | | - var $type, $action, $comment, $params, $target; |
| 39 | + var $type, $action, $comment, $params, $target, $doer; |
40 | 40 | /* @acess public */ |
41 | 41 | var $updateRecentChanges; |
42 | 42 | |
— | — | @@ -56,7 +56,6 @@ |
57 | 57 | $fname = 'LogPage::saveContent'; |
58 | 58 | |
59 | 59 | $dbw = wfGetDB( DB_MASTER ); |
60 | | - $uid = $wgUser->getId(); |
61 | 60 | $log_id = $dbw->nextSequenceValue( 'log_log_id_seq' ); |
62 | 61 | |
63 | 62 | $this->timestamp = $now = wfTimestampNow(); |
— | — | @@ -65,7 +64,7 @@ |
66 | 65 | 'log_type' => $this->type, |
67 | 66 | 'log_action' => $this->action, |
68 | 67 | 'log_timestamp' => $dbw->timestamp( $now ), |
69 | | - 'log_user' => $uid, |
| 68 | + 'log_user' => $this->doer->getId(), |
70 | 69 | 'log_namespace' => $this->target->getNamespace(), |
71 | 70 | 'log_title' => $this->target->getDBkey(), |
72 | 71 | 'log_comment' => $this->comment, |
— | — | @@ -83,7 +82,7 @@ |
84 | 83 | if( !isset($wgLogRestrictions[$this->type]) || $wgLogRestrictions[$this->type]=='*' ) { |
85 | 84 | $titleObj = SpecialPage::getTitleFor( 'Log', $this->type ); |
86 | 85 | $rcComment = $this->getRcComment(); |
87 | | - RecentChange::notifyLog( $now, $titleObj, $wgUser, $rcComment, '', |
| 86 | + RecentChange::notifyLog( $now, $titleObj, $this->doer, $rcComment, '', |
88 | 87 | $this->type, $this->action, $this->target, $this->comment, $this->params, $newId ); |
89 | 88 | } |
90 | 89 | } |
— | — | @@ -246,8 +245,9 @@ |
247 | 246 | * @param object &$target A title object. |
248 | 247 | * @param string $comment Description associated |
249 | 248 | * @param array $params Parameters passed later to wfMsg.* functions |
| 249 | + * @param User $doer The user doing the action |
250 | 250 | */ |
251 | | - function addEntry( $action, $target, $comment, $params = array() ) { |
| 251 | + function addEntry( $action, $target, $comment, $params = array(), $doer = null ) { |
252 | 252 | if ( !is_array( $params ) ) { |
253 | 253 | $params = array( $params ); |
254 | 254 | } |
— | — | @@ -256,6 +256,15 @@ |
257 | 257 | $this->target = $target; |
258 | 258 | $this->comment = $comment; |
259 | 259 | $this->params = LogPage::makeParamBlob( $params ); |
| 260 | + |
| 261 | + if ($doer === null) { |
| 262 | + global $wgUser; |
| 263 | + $doer = $wgUser->getId(); |
| 264 | + } elseif (!is_object( $doer ) ) { |
| 265 | + $doer = User::newFromId( $doer ); |
| 266 | + } |
| 267 | + |
| 268 | + $this->doer = $doer; |
260 | 269 | |
261 | 270 | $this->actionText = LogPage::actionText( $this->type, $action, $target, NULL, $params ); |
262 | 271 | |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -2384,6 +2384,7 @@ |
2385 | 2385 | 'block-log-flags-nocreate' => 'account creation disabled', |
2386 | 2386 | 'block-log-flags-noautoblock' => 'autoblock disabled', |
2387 | 2387 | 'block-log-flags-noemail' => 'e-mail blocked', |
| 2388 | +'block-log-flags-angry-autoblock' => 'enhanced autoblock enabled', |
2388 | 2389 | 'range_block_disabled' => 'The sysop ability to create range blocks is disabled.', |
2389 | 2390 | 'ipb_expiry_invalid' => 'Expiry time invalid.', |
2390 | 2391 | 'ipb_expiry_temp' => 'Hidden username blocks must be permanent.', |