FIX Remove deprecated convert API for SS5.0 (#260)

This commit is contained in:
Bram de Leeuw 2023-11-22 10:00:44 +01:00 committed by GitHub
parent 741a20272a
commit 9a8cc3792e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 5 deletions

View File

@ -4,7 +4,6 @@ namespace Colymba\BulkManager\BulkAction;
use Colymba\BulkManager\BulkAction\Handler;
use SilverStripe\Control\Controller;
use SilverStripe\Core\Convert;
use SilverStripe\Control\HTTPResponse;
use SilverStripe\Forms\FieldList;
use SilverStripe\Forms\Form;
@ -373,9 +372,9 @@ class EditHandler extends Handler
Requirements::add_i18n_javascript('colymba/gridfield-bulk-editing-tools:lang');
if ($this->request->isAjax()) {
$response = new HTTPResponse(
Convert::raw2json(array('Content' => $form->forAjaxTemplate()->getValue()))
);
$response = new HTTPResponse(json_encode([
'Content' => $form->forAjaxTemplate()->getValue()
]));
$response->addHeader('X-Pjax', 'Content');
$response->addHeader('Content-Type', 'text/json');
$response->addHeader('X-Title', 'SilverStripe - Bulk ' . $this->gridField->list->dataClass . ' Editing');

View File

@ -7,7 +7,6 @@ use SilverStripe\Control\Controller;
use SilverStripe\Control\RequestHandler;
use SilverStripe\Control\HTTPRequest;
use SilverStripe\Control\HTTPResponse;
use SilverStripe\Core\Convert;
use SilverStripe\Versioned\RecursivePublishable;
use SilverStripe\AssetAdmin\Controller\AssetAdmin;