From 1c120dc581262565fe327c7f42848b8e3d69e57e Mon Sep 17 00:00:00 2001 From: Awilum Date: Tue, 5 Nov 2019 21:54:42 +0300 Subject: [PATCH] feat(admin-panel): show themes title instead of themes id's on settings page #187 --- site/plugins/admin/app/Controllers/SettingsController.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/site/plugins/admin/app/Controllers/SettingsController.php b/site/plugins/admin/app/Controllers/SettingsController.php index 84676e06..c43c3931 100644 --- a/site/plugins/admin/app/Controllers/SettingsController.php +++ b/site/plugins/admin/app/Controllers/SettingsController.php @@ -37,12 +37,8 @@ class SettingsController extends Controller } $themes = []; - foreach (Filesystem::listContents(PATH['themes']) as $theme) { - if ($theme['type'] !== 'dir' || ! Filesystem::has($theme['path'] . '/' . 'theme.yaml')) { - continue; - } - - $themes[$theme['dirname']] = $theme['dirname']; + foreach ($this->registry->get('themes') as $theme) { + $themes[] = $theme['name']; } $available_locales = Filesystem::listContents(PATH['plugins'] . '/admin/lang/');