Merge pull request #200 from kinglozzer/patch-1

FIX: publishRecursive() is part of RecursivePublishable, not Versioned
This commit is contained in:
Guy Sartorelli 2022-06-28 14:51:29 +12:00 committed by GitHub
commit 1c5ae8a047
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,8 +8,7 @@ use SilverStripe\Control\RequestHandler;
use SilverStripe\Control\HTTPRequest; use SilverStripe\Control\HTTPRequest;
use SilverStripe\Control\HTTPResponse; use SilverStripe\Control\HTTPResponse;
use SilverStripe\Core\Convert; use SilverStripe\Core\Convert;
//use SilverStripe\Core\Injector\Injector; use SilverStripe\Versioned\RecursivePublishable;
//use SilverStripe\ORM\DataObject;
use SilverStripe\AssetAdmin\Controller\AssetAdmin; use SilverStripe\AssetAdmin\Controller\AssetAdmin;
@ -90,8 +89,10 @@ class BulkUploadHandler extends RequestHandler
$this->gridField->list->add($record); $this->gridField->list->add($record);
if ($this->component->getAutoPublishDataObject() && $record->hasExtension('Versioned')) if (
{ $this->component->getAutoPublishDataObject()
&& $record->hasExtension(RecursivePublishable::class)
) {
$record->publishRecursive(); $record->publishRecursive();
} }