From: Rob Church Date: Wed, 27 Jun 2007 02:46:06 +0000 (+0000) Subject: (bug 10360) Fix LogViewer::logLine() for new user log entries. $s->log_user is *not... X-Git-Tag: 1.31.0-rc.0~52379 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/bilan.php?a=commitdiff_plain;h=0ed95cf30b10ffa6adb44e2d3dfbc3a7dd5a516b;p=lhc%2Fweb%2Fwiklou.git (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. --- diff --git a/includes/SpecialLog.php b/includes/SpecialLog.php index 0da3955ff1..2d2b18fbe1 100644 --- a/includes/SpecialLog.php +++ b/includes/SpecialLog.php @@ -401,10 +401,15 @@ class LogViewer { wfMsg( 'protect_change' ), 'action=unprotect' ) . ')'; // show user tool links for self created users + // TODO: The extension should be handling this, get it out of core! } elseif ( $s->log_action == 'create2' ) { - $revert = $this->skin->userToolLinksRedContribs( $s->log_user, $s->log_title ); - // do not show $comment for self created accounts. It includes wrong user tool links: - // 'blockip' for users w/o block allowance and broken links for very long usernames (bug 4756) + if( isset( $paramArray[0] ) ) { + $revert = $this->skin->userToolLinks( $paramArray[0], $s->log_title, true ); + } else { + # Fall back to a blue contributions link + $revert = $this->skin->userToolLinks( 1, $s->log_title ); + } + # Suppress $comment from old entries, not needed and can contain incorrect links $comment = ''; }