mirror of
https://github.com/nextcloud/server.git
synced 2026-04-29 01:50:33 -04:00
Merge pull request #58786 from nextcloud/fix/templates_enabled
fix(files): only disable template creation when both skeleton directories are empty
This commit is contained in:
commit
047a758a31
2 changed files with 2 additions and 2 deletions
|
|
@ -198,7 +198,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());
|
||||
|
||||
|
|
|
|||
|
|
@ -328,7 +328,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 '';
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue