X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FAdmin%2FStorage.php;h=434b43b32ed6e7095ed75b5b1f2fdfbc3e65fedd;hb=c81a9d1ddd7e5b7fff6a173a159ae78ee7fc7698;hp=71d34cb25de6fc03fae490d310bd20a19a2bf53d;hpb=b3226e11ac23e6487cb9539bc73c66fe6627ee44;p=friendica.git diff --git a/src/Module/Admin/Storage.php b/src/Module/Admin/Storage.php index 71d34cb25d..434b43b32e 100644 --- a/src/Module/Admin/Storage.php +++ b/src/Module/Admin/Storage.php @@ -76,7 +76,7 @@ class Storage extends BaseAdmin } } - if (!empty($_POST['submit_save_set'])) { + if (!empty($_POST['submit_save_set']) && DI::config()->isWritable('storage', 'name') ) { try { $newstorage = DI::storageManager()->getWritableStorageByName($storagebackend); @@ -110,7 +110,7 @@ class Storage extends BaseAdmin foreach ($storageConfig->getOptions() as $option => $info) { $type = $info[0]; - // Backward compatibilty with yesno field description + // Backward compatibility with yesno field description if ($type == 'yesno') { $type = 'checkbox'; // Remove translated labels Yes No from field info @@ -145,6 +145,8 @@ class Storage extends BaseAdmin '$save_reload' => DI::l10n()->t('Save & Reload'), '$noconfig' => DI::l10n()->t('This backend doesn\'t have custom settings'), '$form_security_token' => self::getFormSecurityToken("admin_storage"), + '$storagebackend_ro_txt' => !DI::config()->isWritable('storage', 'name') ? DI::l10n()->t('Changing the current backend is prohibited because it is set by an environment variable') : '', + '$is_writable' => DI::config()->isWritable('storage', 'name'), '$storagebackend' => $current_storage_backend instanceof ICanWriteToStorage ? $current_storage_backend::getName() : DI::l10n()->t('Database (legacy)'), '$availablestorageforms' => $available_storage_forms, ]);