improvement for empty names

This commit is contained in:
Ricardo
2020-05-07 21:44:22 +01:00
parent c272de0b48
commit 99bdfe167e

View File

@@ -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);