MediaWiki  REL1_24
EnotifNotifyJob.php
Go to the documentation of this file.
00001 <?php
00029 class EnotifNotifyJob extends Job {
00030     function __construct( $title, $params ) {
00031         parent::__construct( 'enotifNotify', $title, $params );
00032     }
00033 
00034     function run() {
00035         $enotif = new EmailNotification();
00036         // Get the user from ID (rename safe). Anons are 0, so defer to name.
00037         if ( isset( $this->params['editorID'] ) && $this->params['editorID'] ) {
00038             $editor = User::newFromId( $this->params['editorID'] );
00039         // B/C, only the name might be given.
00040         } else {
00041             # @todo FIXME: newFromName could return false on a badly configured wiki.
00042             $editor = User::newFromName( $this->params['editor'], false );
00043         }
00044         $enotif->actuallyNotifyOnPageChange(
00045             $editor,
00046             $this->title,
00047             $this->params['timestamp'],
00048             $this->params['summary'],
00049             $this->params['minorEdit'],
00050             $this->params['oldid'],
00051             $this->params['watchers'],
00052             $this->params['pageStatus']
00053         );
00054 
00055         return true;
00056     }
00057 }