From a86c8535e076f54d7c8be8cc36f99abf5a608f12 Mon Sep 17 00:00:00 2001 From: Michael Kaufmann Date: Thu, 27 Jul 2023 16:58:22 +0200 Subject: [PATCH] fix tablelisting of backup-storages Signed-off-by: Michael Kaufmann --- admin_backups.php | 6 +++--- .../admin/backup_storages/formfield.backup_storage_add.php | 1 + lib/tablelisting/admin/tablelisting.backup_storages.php | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/admin_backups.php b/admin_backups.php index cda3f6f0..0004da5b 100644 --- a/admin_backups.php +++ b/admin_backups.php @@ -82,15 +82,15 @@ if (($page == 'backups' || $page == 'overview')) { $log->logAction(FroxlorLogger::ADM_ACTION, LOG_INFO, "list backup storages"); try { - $admin_list_data = include_once dirname(__FILE__) . '/lib/tablelisting/admin/tablelisting.backup_storages.php'; + $backup_storage_list_data = include_once dirname(__FILE__) . '/lib/tablelisting/admin/tablelisting.backup_storages.php'; $collection = (new Collection(BackupStorages::class, $userinfo)) - ->withPagination($admin_list_data['backup_storages_list']['columns'], $admin_list_data['backup_storages_list']['default_sorting']); + ->withPagination($backup_storage_list_data['backup_storages_list']['columns'], $backup_storage_list_data['backup_storages_list']['default_sorting']); } catch (Exception $e) { Response::dynamicError($e->getMessage()); } UI::view('user/table.html.twig', [ - 'listing' => Listing::format($collection, $admin_list_data, 'backup_storages_list'), + 'listing' => Listing::format($collection, $backup_storage_list_data, 'backup_storages_list'), 'actions_links' => [ [ 'href' => $linker->getLink(['section' => 'backups', 'page' => 'backups']), diff --git a/lib/formfields/admin/backup_storages/formfield.backup_storage_add.php b/lib/formfields/admin/backup_storages/formfield.backup_storage_add.php index 28856194..7ea3bf5b 100644 --- a/lib/formfields/admin/backup_storages/formfield.backup_storage_add.php +++ b/lib/formfields/admin/backup_storages/formfield.backup_storage_add.php @@ -81,6 +81,7 @@ return [ 'pgp_public_key' => [ 'label' => lng('backup.backup_storage.pgp_public_key'), 'type' => 'textarea', + 'value' => Settings::Get('backup.default_pgp_public_key') ], 'retention' => [ 'label' => lng('backup.backup_storage.retention'), diff --git a/lib/tablelisting/admin/tablelisting.backup_storages.php b/lib/tablelisting/admin/tablelisting.backup_storages.php index 4447faec..716fa1fd 100644 --- a/lib/tablelisting/admin/tablelisting.backup_storages.php +++ b/lib/tablelisting/admin/tablelisting.backup_storages.php @@ -36,7 +36,7 @@ return [ 'title' => lng('backup.backup_storages.list'), 'icon' => 'fa-solid fa-file-archive', 'self_overview' => ['section' => 'backups', 'page' => 'storages'], - 'default_sorting' => ['loginname' => 'asc'], + 'default_sorting' => ['description' => 'asc'], 'columns' => [ 'id' => [ 'label' => 'ID',