MediaWiki
REL1_32
DeletePageJob.php
Go to the documentation of this file.
1
<?php
2
6
class
DeletePageJob
extends
Job
{
7
public
function
__construct
( $title,
$params
) {
8
parent::__construct(
'deletePage'
, $title,
$params
);
9
}
10
16
public
function
run
() {
17
// Failure to load the page is not job failure.
18
// A parallel deletion operation may have already completed the page deletion.
19
$wikiPage = WikiPage::newFromID( $this->params[
'wikiPageId'
] );
20
if
( $wikiPage ) {
21
$wikiPage->doDeleteArticleBatched(
22
$this->params[
'reason'
],
23
$this->params[
'suppress'
],
24
User::newFromId
( $this->params[
'userId'
] ),
25
json_decode( $this->params[
'tags'
] ),
26
$this->params[
'logsubtype'
],
27
false
,
28
$this->
getRequestId
() );
29
}
30
return
true
;
31
}
32
}
DeletePageJob
Class DeletePageJob.
Definition
DeletePageJob.php:6
DeletePageJob\__construct
__construct( $title, $params)
Definition
DeletePageJob.php:7
DeletePageJob\run
run()
Execute the job.
Definition
DeletePageJob.php:16
Job
Class to both describe a background job and handle jobs.
Definition
Job.php:30
Job\$params
array $params
Array of job parameters.
Definition
Job.php:35
Job\getRequestId
getRequestId()
Definition
Job.php:172
User\newFromId
static newFromId( $id)
Static factory method for creation from a given user ID.
Definition
User.php:615
includes
jobqueue
jobs
DeletePageJob.php
Generated on Mon Nov 25 2024 15:57:11 for MediaWiki by
1.10.0