CCM NG/ccm-core: Bugfix for ContentSectionSetup

git-svn-id: https://svn.libreccm.org/ccm/ccm_ng@4782 8810af33-2d31-482b-a856-94f89814c4df
ccm-docs
jensp 2017-06-14 17:17:50 +00:00
parent 721696ae44
commit 424388fba6
1 changed files with 5 additions and 3 deletions

View File

@ -18,6 +18,8 @@
*/ */
package org.librecms.contentsection; package org.librecms.contentsection;
import com.arsdigita.kernel.KernelConfig;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import org.libreccm.core.UnexpectedErrorException; import org.libreccm.core.UnexpectedErrorException;
@ -121,18 +123,18 @@ public class ContentSectionSetup extends AbstractCcmApplicationSetup {
section.getPrimaryUrl(), section.getPrimaryUrl(),
section.getDisplayName(), section.getDisplayName(),
section.getLabel()); section.getLabel());
final Folder rootFolder = new Folder(); final Folder rootFolder = new Folder();
rootFolder.setUuid(UUID.randomUUID().toString()); rootFolder.setUuid(UUID.randomUUID().toString());
rootFolder.setUniqueId(rootFolder.getUuid()); rootFolder.setUniqueId(rootFolder.getUuid());
rootFolder.setName(String.format("%s_" + ROOT, sectionName)); rootFolder.setName(String.format("%s_" + ROOT, sectionName));
rootFolder.getTitle().addValue(Locale.ROOT, "/"); rootFolder.getTitle().addValue(new Locale("en"), "/");
rootFolder.setType(FolderType.DOCUMENTS_FOLDER); rootFolder.setType(FolderType.DOCUMENTS_FOLDER);
rootFolder.setSection(section); rootFolder.setSection(section);
final Folder rootAssetFolder = new Folder(); final Folder rootAssetFolder = new Folder();
rootAssetFolder.setName(String.format("%s_" + ASSETS, sectionName)); rootAssetFolder.setName(String.format("%s_" + ASSETS, sectionName));
rootAssetFolder.getTitle().addValue(Locale.ROOT, "/"); rootAssetFolder.getTitle().addValue(new Locale("en"), "/");
rootAssetFolder.setUuid(UUID.randomUUID().toString()); rootAssetFolder.setUuid(UUID.randomUUID().toString());
rootAssetFolder.setUniqueId(rootAssetFolder.getUuid()); rootAssetFolder.setUniqueId(rootAssetFolder.getUuid());
rootAssetFolder.setType(FolderType.ASSETS_FOLDER); rootAssetFolder.setType(FolderType.ASSETS_FOLDER);