From 833a81e84b77e4f694d245f2757d0abe64e65e98 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Sat, 17 May 2008 22:37:06 +0000 Subject: [PATCH] Don't assume $wgUser is always the editor, it's poor practice and confusing... --- includes/RecentChange.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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'], -- 2.20.1