fix: only skip template initialization when both skeletondirectory and templatedirectory are empty

Signed-off-by: Benjamin Frueh <benjamin.frueh@gmail.com>
This commit is contained in:
Benjamin Frueh 2026-03-08 00:12:56 +01:00 committed by Elizabeth Danzberger
parent cdcd40d58f
commit bfe5df94dc
No known key found for this signature in database
GPG key ID: 6B466A21DF5E753C
2 changed files with 2 additions and 2 deletions

View file

@ -202,7 +202,7 @@ class ViewController extends Controller {
$this->eventDispatcher->dispatchTyped(new LoadViewer());
}
$this->initialState->provideInitialState('templates_enabled', ($this->config->getSystemValueString('skeletondirectory', \OC::$SERVERROOT . '/core/skeleton') !== '') || ($this->config->getSystemValueString('templatedirectory', \OC::$SERVERROOT . '/core/skeleton/Templates') !== ''));
$this->initialState->provideInitialState('templates_enabled', true);
$this->initialState->provideInitialState('templates_path', $this->templateManager->hasTemplateDirectory() ? $this->templateManager->getTemplatePath() : false);
$this->initialState->provideInitialState('templates', $this->templateManager->listCreators());

View file

@ -334,7 +334,7 @@ class TemplateManager implements ITemplateManager {
$isDefaultTemplates = $skeletonTemplatePath === $defaultTemplateDirectory;
$userLang = $this->l10nFactory->getUserLanguage($this->userManager->get($this->userId));
if ($skeletonTemplatePath === '') {
if ($path === null && $skeletonTemplatePath === '' && $skeletonPath === '') {
$this->setTemplatePath('');
return '';
}