Merge pull request #59750 from nextcloud/backport/58786/stable32

[stable32] fix(files): only disable template creation when both skeleton directories are empty
This commit is contained in:
Elizabeth Danzberger 2026-05-07 16:13:22 -04:00 committed by GitHub
commit 669d859b22
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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 '';
}