MediaWiki
REL1_19
|
00001 <?php 00014 class EnotifNotifyJob extends Job { 00015 00016 function __construct( $title, $params, $id = 0 ) { 00017 parent::__construct( 'enotifNotify', $title, $params, $id ); 00018 } 00019 00020 function run() { 00021 $enotif = new EmailNotification(); 00022 // Get the user from ID (rename safe). Anons are 0, so defer to name. 00023 if( isset( $this->params['editorID'] ) && $this->params['editorID'] ) { 00024 $editor = User::newFromId( $this->params['editorID'] ); 00025 // B/C, only the name might be given. 00026 } else { 00027 # FIXME: newFromName could return false on a badly configured wiki. 00028 $editor = User::newFromName( $this->params['editor'], false ); 00029 } 00030 $enotif->actuallyNotifyOnPageChange( 00031 $editor, 00032 $this->title, 00033 $this->params['timestamp'], 00034 $this->params['summary'], 00035 $this->params['minorEdit'], 00036 $this->params['oldid'], 00037 $this->params['watchers'] 00038 ); 00039 return true; 00040 } 00041 00042 }