Rename ISelectableStorage to IWritableStorage

This commit is contained in:
Philipp 2021-08-10 22:07:52 +02:00
parent eb035771f1
commit d0536ebea7
No known key found for this signature in database
GPG key ID: 9A28B7D4FF5667BD
16 changed files with 64 additions and 63 deletions

View file

@ -284,7 +284,7 @@ class Attach
$items = self::selectToArray(['backend-class','backend-ref'], $conditions);
foreach($items as $item) {
$backend_class = DI::storageManager()->getSelectableStorageByName($item['backend-class'] ?? '');
$backend_class = DI::storageManager()->getWritableStorageByName($item['backend-class'] ?? '');
if (!empty($backend_class)) {
$fields['backend-ref'] = $backend_class->put($img->asString(), $item['backend-ref'] ?? '');
} else {
@ -316,7 +316,7 @@ class Attach
$items = self::selectToArray(['backend-class','backend-ref'], $conditions);
foreach($items as $item) {
$backend_class = DI::storageManager()->getSelectableStorageByName($item['backend-class'] ?? '');
$backend_class = DI::storageManager()->getWritableStorageByName($item['backend-class'] ?? '');
if (!empty($backend_class)) {
try {
$backend_class->delete($item['backend-ref'] ?? '');