From: Aaron Schulz Date: Sat, 17 May 2008 22:37:06 +0000 (+0000) Subject: Don't assume $wgUser is always the editor, it's poor practice and confusing... X-Git-Tag: 1.31.0-rc.0~47565 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=833a81e84b77e4f694d245f2757d0abe64e65e98;p=lhc%2Fweb%2Fwiklou.git Don't assume $wgUser is always the editor, it's poor practice and confusing... --- diff --git a/includes/RecentChange.php b/includes/RecentChange.php index c1f27227d8..2331288c83 100644 --- a/includes/RecentChange.php +++ b/includes/RecentChange.php @@ -224,10 +224,12 @@ class RecentChange # E-mail notifications global $wgUseEnotif, $wgUser; if( $wgUseEnotif ) { + $editor = ($wgUser->getID() == $this->mAttribs['rc_user']) ? + $wgUser : User::newFromID( $this->mAttribs['rc_user'] ); # FIXME: this would be better as an extension hook $enotif = new EmailNotification(); $title = Title::makeTitle( $this->mAttribs['rc_namespace'], $this->mAttribs['rc_title'] ); - $enotif->notifyOnPageChange( $wgUser, $title, + $enotif->notifyOnPageChange( $editor, $title, $this->mAttribs['rc_timestamp'], $this->mAttribs['rc_comment'], $this->mAttribs['rc_minor'],