]> git.mxchange.org Git - friendica.git/commitdiff
Use direct logic
authorfabrixxm <fabrix.xm@gmail.com>
Wed, 10 Apr 2019 18:57:22 +0000 (20:57 +0200)
committerfabrixxm <fabrix.xm@gmail.com>
Wed, 10 Apr 2019 18:57:22 +0000 (20:57 +0200)
mod/admin.php

index 7ee48f592ef252920f5c40ef8d6cf59602124793..fe068629625d5c5a6607b82f4c4a589c7f4f5be4 100644 (file)
@@ -1157,9 +1157,7 @@ function admin_page_site_post(App $a)
 
        // save storage backend form
        if (!is_null($storagebackend) && $storagebackend != "") {
-               if (!StorageManager::setBackend($storagebackend)) {
-                       info(L10n::t('Invalid storage backend setting value.'));
-               } else {
+               if (StorageManager::setBackend($storagebackend)) {
                        $storage_opts = $storagebackend::getOptions();
                        $storage_form_prefix=preg_replace('|[^a-zA-Z0-9]|' ,'', $storagebackend);
                        $storage_opts_data = [];
@@ -1185,6 +1183,8 @@ function admin_page_site_post(App $a)
                                }
                                $a->internalRedirect('admin/site' . $active_panel);
                        }
+               } else {
+                       info(L10n::t('Invalid storage backend setting value.'));
                }
        }