mirror of
https://github.com/silverstripe/silverstripe-externallinks.git
synced 2024-10-22 15:05:44 +00:00
21 lines
484 B
PHP
21 lines
484 B
PHP
|
<?php
|
||
|
|
||
|
class CMSExternalLinks_Controller extends Controller {
|
||
|
|
||
|
private static $allowed_actions = array('createQueuedReport');
|
||
|
|
||
|
|
||
|
public function createQueuedReport() {
|
||
|
if (!Permission::check('ADMIN')) return;
|
||
|
|
||
|
// setup external links job
|
||
|
$externalLinks = new CheckExternalLinksJob();
|
||
|
$job = singleton('QueuedJobService');
|
||
|
$jobID = $job->queueJob($externalLinks);
|
||
|
|
||
|
// redirect to the jobs page
|
||
|
$admin = QueuedJobsAdmin::create();
|
||
|
$this->Redirect($admin->Link());
|
||
|
}
|
||
|
}
|