Merge pull request #50540 from nextcloud/fix/show-templates-folder-default

fix: Only hide template folder creation if default was changed to empty
This commit is contained in:
Julius Knorr 2025-01-30 11:21:56 +01:00 committed by GitHub
commit 8604389ebe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -194,7 +194,7 @@ class ViewController extends Controller {
$this->eventDispatcher->dispatchTyped(new LoadViewer());
}
$this->initialState->provideInitialState('templates_enabled', ($this->config->getSystemValueString('skeletondirectory', '') !== '') || ($this->config->getSystemValueString('templatedirectory', '') !== ''));
$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_path', $this->templateManager->hasTemplateDirectory() ? $this->templateManager->getTemplatePath() : false);
$this->initialState->provideInitialState('templates', $this->templateManager->listCreators());