2013-08-26 02:24:36 +02:00
|
|
|
<?php
|
|
|
|
|
2014-07-28 01:23:33 +02:00
|
|
|
if(!class_exists('AbstractQueuedJob')) return;
|
|
|
|
|
2013-08-26 02:24:36 +02:00
|
|
|
/**
|
2014-07-24 04:20:48 +02:00
|
|
|
* A Job for running a external link check for published pages
|
2013-08-26 02:24:36 +02:00
|
|
|
*
|
|
|
|
*/
|
2014-07-24 04:20:48 +02:00
|
|
|
class CheckExternalLinksJob extends AbstractQueuedJob implements QueuedJob {
|
2013-08-26 02:24:36 +02:00
|
|
|
|
|
|
|
public function getTitle() {
|
2014-07-28 01:23:33 +02:00
|
|
|
return _t('CheckExternalLiksJob.TITLE', 'Checking for external broken links');
|
2013-08-26 02:24:36 +02:00
|
|
|
}
|
|
|
|
|
2014-07-24 04:20:48 +02:00
|
|
|
public function getJobType() {
|
|
|
|
return QueuedJob::QUEUED;
|
|
|
|
}
|
|
|
|
|
2013-08-26 02:24:36 +02:00
|
|
|
public function getSignature() {
|
|
|
|
return md5(get_class($this));
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2014-07-24 04:20:48 +02:00
|
|
|
* Check a individual page
|
2013-08-26 02:24:36 +02:00
|
|
|
*/
|
|
|
|
public function process() {
|
2013-08-26 02:53:01 +02:00
|
|
|
$task = new CheckExternalLinks();
|
2014-07-30 02:34:39 +02:00
|
|
|
$task->run();
|
2014-07-31 06:49:20 +02:00
|
|
|
$this->isComplete = true;
|
|
|
|
return;
|
2013-08-26 02:24:36 +02:00
|
|
|
}
|
2014-07-24 04:20:48 +02:00
|
|
|
|
|
|
|
}
|