From 99bdfe167eb78bf2ba15668551f94eab4c9d3e13 Mon Sep 17 00:00:00 2001 From: Ricardo Date: Thu, 7 May 2020 21:44:22 +0100 Subject: [PATCH] improvement for empty names --- classes/plugin/AdminController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/plugin/AdminController.php b/classes/plugin/AdminController.php index fc5823da..5a5c584e 100644 --- a/classes/plugin/AdminController.php +++ b/classes/plugin/AdminController.php @@ -2195,9 +2195,9 @@ class AdminController extends AdminBaseController } $data = ['color_scheme' => $this->data['whitelabel']['color_scheme'] ?? null]; - $name = $this->data['whitelabel']['color_scheme']['name'] ?? 'theme'; + $name = empty($this->data['whitelabel']['color_scheme']['name']) ? 'admin-theme-export' : \Grav\Plugin\Admin\Utils::slug($this->data['whitelabel']['color_scheme']['name']); - $location = 'asset://' . \Grav\Plugin\Admin\Utils::slug($name) . '.yaml'; + $location = 'asset://' . $name . '.yaml'; [$status, $msg] = $this->grav['admin-whitelabel']->exportPresetScsss($data, $location);