mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 17:29:21 +02:00
Fix if someone deletes the default kathrine template
This commit is contained in:
parent
41a3cb6f42
commit
c52ca27126
@ -11,8 +11,14 @@
|
|||||||
* - for number: min, max, step
|
* - for number: min, max, step
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
use MyAAC\Cache;
|
||||||
use MyAAC\Settings;
|
use MyAAC\Settings;
|
||||||
|
|
||||||
|
$templates = Cache::remember('templates', 5 * 60, function () {
|
||||||
|
return get_templates();
|
||||||
|
});
|
||||||
|
$defaultTemplate = in_array('kathrine', $templates) ? 'kathrine' : $templates[0];
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'name' => 'MyAAC',
|
'name' => 'MyAAC',
|
||||||
'settings' => [
|
'settings' => [
|
||||||
@ -88,7 +94,7 @@ return [
|
|||||||
'type' => 'options',
|
'type' => 'options',
|
||||||
'options' => '$templates',
|
'options' => '$templates',
|
||||||
'desc' => 'Name of the template used by website',
|
'desc' => 'Name of the template used by website',
|
||||||
'default' => 'kathrine',
|
'default' => $defaultTemplate,
|
||||||
],
|
],
|
||||||
'template_allow_change' => [
|
'template_allow_change' => [
|
||||||
'name' => 'Template Allow Change',
|
'name' => 'Template Allow Change',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user