mirror of
https://github.com/a2nt/cms-niceties.git
synced 2024-10-22 11:05:46 +02:00
IMPR: Publish all files
This commit is contained in:
parent
6c7c210919
commit
f4153e53f2
@ -5,11 +5,11 @@ namespace A2nt\CMSNiceties\Tasks;
|
||||
use SilverStripe\Assets\File;
|
||||
use SilverStripe\Dev\BuildTask;
|
||||
|
||||
class PublishAllFiles extends BuildTask
|
||||
class BrokenFilesTask extends BuildTask
|
||||
{
|
||||
protected $title = 'Publish All Files Task';
|
||||
protected $title = 'Broken Files Task';
|
||||
|
||||
protected $description = 'Publish All Files';
|
||||
protected $description = 'Broken files report';
|
||||
|
||||
protected $enabled = true;
|
||||
|
||||
@ -19,8 +19,10 @@ class PublishAllFiles extends BuildTask
|
||||
$i = 0;
|
||||
foreach ($files as $file) {
|
||||
if ($file->exists()) {
|
||||
$file->publishFile();
|
||||
echo '<b>'.$file->getField('Name').'</b><br/>';
|
||||
$file->publishRecursive();
|
||||
}
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user