diff --git a/src/Manage.php b/src/Manage.php index 92b5178..6afb76e 100644 --- a/src/Manage.php +++ b/src/Manage.php @@ -115,9 +115,11 @@ class Manage extends dcNsProcess $models = iterator_to_array($models); $s = dcCore::app()->blog->settings->get(My::id()); $model = json_decode((string) $s->get('model'), true); + $model = array_merge(My::defaultModel(), is_array($model) ? $model : []); $header = ''; foreach ($models as $m) { + $m = array_merge(My::defaultModel(), $m); $header .= "\t" . 'arlequin.addModel(' . '"' . Html::escapeJS($m['name']) . '",' . diff --git a/src/My.php b/src/My.php index 284bbe8..f2991bf 100644 --- a/src/My.php +++ b/src/My.php @@ -85,6 +85,7 @@ class My public static function defaultModel(): array { return [ + 'name' => __('Default'), 'e_html' => '