From: Mark A. Hershberger Date: Mon, 20 Feb 2012 21:36:07 +0000 (+0000) Subject: fix bug #34495 — patrol log credit the user patrolled, not the user patrolling X-Git-Tag: 1.31.0-rc.0~24605 X-Git-Url: http://git.cyclocoop.org/?a=commitdiff_plain;h=8ef101660332d290e5fc40932158635f0e21d26f;p=lhc%2Fweb%2Fwiklou.git fix bug #34495 — patrol log credit the user patrolled, not the user patrolling --- diff --git a/includes/logging/PatrolLog.php b/includes/logging/PatrolLog.php index 04fdc4f2a6..fc7408a383 100644 --- a/includes/logging/PatrolLog.php +++ b/includes/logging/PatrolLog.php @@ -27,10 +27,12 @@ class PatrolLog { $title = Title::makeTitleSafe( $rc->getAttribute( 'rc_namespace' ), $rc->getAttribute( 'rc_title' ) ); if( $title ) { + global $wgUser; + $entry = new ManualLogEntry( 'patrol', 'patrol' ); $entry->setTarget( $title ); $entry->setParameters( self::buildParams( $rc, $auto ) ); - $entry->setPerformer( User::newFromName( $rc->getAttribute( 'rc_user_text' ), false ) ); + $entry->setPerformer( $wgUser, false ) ); $logid = $entry->insert(); if ( !$auto ) { $entry->publish( $logid, 'udp' );