MediaWiki  1.23.6
DuplicateJob.php
Go to the documentation of this file.
1 <?php
29 final class DuplicateJob extends Job {
36  function __construct( $title, $params ) {
37  parent::__construct( 'duplicate', $title, $params );
38  }
39 
46  public static function newFromJob( Job $job ) {
47  $djob = new self( $job->getTitle(), $job->getParams() );
48  $djob->command = $job->getType();
49  $djob->params = is_array( $djob->params ) ? $djob->params : array();
50  $djob->params = array( 'isDuplicate' => true ) + $djob->params;
51  $djob->metadata = $job->metadata;
52 
53  return $djob;
54  }
55 
56  public function run() {
57  return true;
58  }
59 }
php
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
Definition: skin.txt:62
Job\$title
Title $title
Definition: Job.php:38
Job
Class to both describe a background job and handle jobs.
Definition: Job.php:31
array
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
DuplicateJob\newFromJob
static newFromJob(Job $job)
Get a duplicate no-op version of a job.
Definition: DuplicateJob.php:46
DuplicateJob
No-op job that does nothing.
Definition: DuplicateJob.php:29
DuplicateJob\run
run()
Run the job.
Definition: DuplicateJob.php:56
Job\$params
array bool $params
Array of job parameters or false if none *.
Definition: Job.php:34
DuplicateJob\__construct
__construct( $title, $params)
Callers should use DuplicateJob::newFromJob() instead.
Definition: DuplicateJob.php:36
$job
if(count( $args)< 1) $job
Definition: recompressTracked.php:42