summaryrefslogtreecommitdiff
path: root/includes/EnotifNotifyJob.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2008-08-15 01:29:47 +0200
committerPierre Schmitz <pierre@archlinux.de>2008-08-15 01:29:47 +0200
commit370e83bb0dfd0c70de268c93bf07ad5ee0897192 (patch)
tree491674f4c242e4d6ba0d04eafa305174c35a3391 /includes/EnotifNotifyJob.php
parentf4debf0f12d0524d2b2427c55ea3f16b680fad97 (diff)
Update auf 1.13.0
Diffstat (limited to 'includes/EnotifNotifyJob.php')
-rw-r--r--includes/EnotifNotifyJob.php24
1 files changed, 16 insertions, 8 deletions
diff --git a/includes/EnotifNotifyJob.php b/includes/EnotifNotifyJob.php
index 70d1de69..31fcb0d5 100644
--- a/includes/EnotifNotifyJob.php
+++ b/includes/EnotifNotifyJob.php
@@ -2,6 +2,8 @@
/**
* Job for email notification mails
+ *
+ * @ingroup JobQueue
*/
class EnotifNotifyJob extends Job {
@@ -11,16 +13,22 @@ class EnotifNotifyJob extends Job {
function run() {
$enotif = new EmailNotification();
+ // Get the user from ID (rename safe). Anons are 0, so defer to name.
+ if( isset($this->params['editorID']) && $this->params['editorID'] ) {
+ $editor = User::newFromId( $this->params['editorID'] );
+ // B/C, only the name might be given.
+ } else {
+ $editor = User::newFromName( $this->params['editor'], false );
+ }
$enotif->actuallyNotifyOnPageChange(
- User::newFromName( $this->params['editor'], false ),
- $this->title,
- $this->params['timestamp'],
- $this->params['summary'],
- $this->params['minorEdit'],
- $this->params['oldid']
+ $editor,
+ $this->title,
+ $this->params['timestamp'],
+ $this->params['summary'],
+ $this->params['minorEdit'],
+ $this->params['oldid']
);
return true;
}
-
-}
+}