MediaWiki
REL1_24
|
00001 <?php 00029 final class DuplicateJob extends Job { 00036 function __construct( $title, $params ) { 00037 parent::__construct( 'duplicate', $title, $params ); 00038 } 00039 00046 public static function newFromJob( Job $job ) { 00047 $djob = new self( $job->getTitle(), $job->getParams() ); 00048 $djob->command = $job->getType(); 00049 $djob->params = is_array( $djob->params ) ? $djob->params : array(); 00050 $djob->params = array( 'isDuplicate' => true ) + $djob->params; 00051 $djob->metadata = $job->metadata; 00052 00053 return $djob; 00054 } 00055 00056 public function run() { 00057 return true; 00058 } 00059 }