]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Admin/Storage.php
Merge pull request #12425 from MrPetovan/task/11774-frio-remove-banner-setting
[friendica.git] / src / Module / Admin / Storage.php
index 796f88bb32b4af972f7b0c64081d9309f6935bf1..2075534372e1169a6c2d306ded8211dab4ab381f 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -31,7 +31,7 @@ use Friendica\Util\Strings;
 
 class Storage extends BaseAdmin
 {
-       protected function post(array $request = [], array $post = [])
+       protected function post(array $request = [])
        {
                self::checkAdminAccess();
 
@@ -43,7 +43,7 @@ class Storage extends BaseAdmin
                        /** @var ICanConfigureStorage|false $newStorageConfig */
                        $newStorageConfig = DI::storageManager()->getConfigurationByName($storagebackend);
                } catch (InvalidClassStorageException $storageException) {
-                       notice(DI::l10n()->t('Storage backend, %s is invalid.', $storagebackend));
+                       DI::sysmsg()->addNotice(DI::l10n()->t('Storage backend, %s is invalid.', $storagebackend));
                        DI::baseUrl()->redirect('admin/storage');
                }
 
@@ -70,7 +70,7 @@ class Storage extends BaseAdmin
                        $storage_form_errors = $newStorageConfig->saveOptions($storage_opts_data);
                        if (count($storage_form_errors)) {
                                foreach ($storage_form_errors as $name => $err) {
-                                       notice(DI::l10n()->t('Storage backend %s error: %s', $storage_opts[$name][1], $err));
+                                       DI::sysmsg()->addNotice(DI::l10n()->t('Storage backend %s error: %s', $storage_opts[$name][1], $err));
                                }
                                DI::baseUrl()->redirect('admin/storage');
                        }
@@ -81,10 +81,10 @@ class Storage extends BaseAdmin
                                $newstorage = DI::storageManager()->getWritableStorageByName($storagebackend);
 
                                if (!DI::storageManager()->setBackend($newstorage)) {
-                                       notice(DI::l10n()->t('Invalid storage backend setting value.'));
+                                       DI::sysmsg()->addNotice(DI::l10n()->t('Invalid storage backend setting value.'));
                                }
                        } catch (InvalidClassStorageException $storageException) {
-                               notice(DI::l10n()->t('Invalid storage backend setting value.'));
+                               DI::sysmsg()->addNotice(DI::l10n()->t('Invalid storage backend setting value.'));
                        }
                }