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