Browse Source

replace deprecated functions

d9_islandora
Eli Zoller 4 years ago
parent
commit
56ae235f51
  1. 2
      src/Controller/ManageMembersController.php
  2. 3
      src/Flysystem/Adapter/FedoraAdapter.php

2
src/Controller/ManageMembersController.php

@ -130,7 +130,7 @@ class ManageMembersController extends EntityController {
} }
// Build the message shown when there are no bundles. // Build the message shown when there are no bundles.
$type_label = $type_definition->getLowercaseLabel(); $type_label = $type_definition->getSingularLabel();
$link_text = $this->t('Add a new @entity_type.', ['@entity_type' => $type_label]); $link_text = $this->t('Add a new @entity_type.', ['@entity_type' => $type_label]);
$build['#add_bundle_message'] = $this->t('There is no @entity_type yet. @add_link', [ $build['#add_bundle_message'] = $this->t('There is no @entity_type yet. @add_link', [
'@entity_type' => $type_label, '@entity_type' => $type_label,

3
src/Flysystem/Adapter/FedoraAdapter.php

@ -8,6 +8,7 @@ use League\Flysystem\Adapter\Polyfill\NotSupportingVisibilityTrait;
use League\Flysystem\Adapter\Polyfill\StreamedCopyTrait; use League\Flysystem\Adapter\Polyfill\StreamedCopyTrait;
use League\Flysystem\Config; use League\Flysystem\Config;
use GuzzleHttp\Psr7; use GuzzleHttp\Psr7;
use GuzzleHttp\Psr7\Header;
use GuzzleHttp\Psr7\Response; use GuzzleHttp\Psr7\Response;
use GuzzleHttp\Psr7\StreamWrapper; use GuzzleHttp\Psr7\StreamWrapper;
use Symfony\Component\HttpFoundation\File\MimeType\MimeTypeGuesserInterface; use Symfony\Component\HttpFoundation\File\MimeType\MimeTypeGuesserInterface;
@ -144,7 +145,7 @@ class FedoraAdapter implements AdapterInterface {
// NonRDFSource's are considered files. Everything else is a // NonRDFSource's are considered files. Everything else is a
// directory. // directory.
$type = 'dir'; $type = 'dir';
$links = Psr7\parse_header($response->getHeader('Link')); $links = Header::parse($response->getHeader('Link'));
foreach ($links as $link) { foreach ($links as $link) {
if ($link['rel'] == 'type' && $link[0] == '<http://www.w3.org/ns/ldp#NonRDFSource>') { if ($link['rel'] == 'type' && $link[0] == '<http://www.w3.org/ns/ldp#NonRDFSource>') {
$type = 'file'; $type = 'file';

Loading…
Cancel
Save