r23447 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r23446‎ | r23447 | r23448 >
Date:02:46, 27 June 2007
Author:robchurch
Status:old
Tags:
Comment:
(bug 10360) Fix LogViewer::logLine() for new user log entries. $s->log_user is *not* the user_id of the user we created, it's the user_id of the creating user, and when $s->log_action is 'create2', these are not the same. Use the ID stashed in log_params (as of r23446) if available, otherwise fall back to a normal contributions link.
Modified paths:
  • /trunk/phase3/includes/SpecialLog.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialLog.php
@@ -401,10 +401,15 @@
402402 wfMsg( 'protect_change' ),
403403 'action=unprotect' ) . ')';
404404 // show user tool links for self created users
 405+ // TODO: The extension should be handling this, get it out of core!
405406 } elseif ( $s->log_action == 'create2' ) {
406 - $revert = $this->skin->userToolLinksRedContribs( $s->log_user, $s->log_title );
407 - // do not show $comment for self created accounts. It includes wrong user tool links:
408 - // 'blockip' for users w/o block allowance and broken links for very long usernames (bug 4756)
 407+ if( isset( $paramArray[0] ) ) {
 408+ $revert = $this->skin->userToolLinks( $paramArray[0], $s->log_title, true );
 409+ } else {
 410+ # Fall back to a blue contributions link
 411+ $revert = $this->skin->userToolLinks( 1, $s->log_title );
 412+ }
 413+ # Suppress $comment from old entries, not needed and can contain incorrect links
409414 $comment = '';
410415 }
411416

Follow-up revisions

RevisionCommit summaryAuthorDate
r23581Merged revisions 23406-23580 via svnmerge from...david04:50, 30 June 2007

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r23446Stash the created user's identifier in log parameters for later userobchurch02:42, 27 June 2007

Status & tagging log