CCM NG/ccm-cms: Some bugfixes

git-svn-id: https://svn.libreccm.org/ccm/ccm_ng@4704 8810af33-2d31-482b-a856-94f89814c4df
ccm-docs
jensp 2017-05-03 18:16:06 +00:00
parent d47d36b21e
commit a8ffa958e6
6 changed files with 13 additions and 8 deletions

View File

@ -882,6 +882,8 @@ public class ContentItemManager {
liveItem.setLifecycle(lifecycle); liveItem.setLifecycle(lifecycle);
liveItem.setWorkflow(draftItem.getWorkflow()); liveItem.setWorkflow(draftItem.getWorkflow());
contentItemRepo.save(liveItem);
final List<Category> oldCategories = liveItem final List<Category> oldCategories = liveItem
.getCategories() .getCategories()
.stream() .stream()
@ -895,11 +897,15 @@ public class ContentItemManager {
} }
}); });
contentItemRepo.save(liveItem);
draftItem.getCategories().forEach(categorization -> categoryManager draftItem.getCategories().forEach(categorization -> categoryManager
.addObjectToCategory(liveItem, .addObjectToCategory(liveItem,
categorization.getCategory(), categorization.getCategory(),
categorization.getType())); categorization.getType()));
contentItemRepo.save(liveItem);
for (int i = 0; i < draftItem.getAttachments().size(); i++) { for (int i = 0; i < draftItem.getAttachments().size(); i++) {
final AttachmentList sourceList = draftItem.getAttachments().get(i); final AttachmentList sourceList = draftItem.getAttachments().get(i);
@ -969,9 +975,8 @@ public class ContentItemManager {
} }
} }
// for (AttachmentList attachmentList : item.getAttachments()) { contentItemRepo.save(liveItem);
// copyAttachmentList(attachmentList, liveItem);
// }
final BeanInfo beanInfo; final BeanInfo beanInfo;
try { try {
beanInfo = Introspector.getBeanInfo(item.getClass()); beanInfo = Introspector.getBeanInfo(item.getClass());

View File

@ -682,7 +682,7 @@
<ccm_core.categorizations categorization_id="-30110" <ccm_core.categorizations categorization_id="-30110"
category_id="-2300" category_id="-2300"
object_id="-10110" object_id="-10110"
category_order="2" category_order="1"
object_order="1" object_order="1"
category_index="false" category_index="false"
type="folder" /> type="folder" />

View File

@ -676,7 +676,7 @@
<ccm_core.categorizations categorization_id="-30500" <ccm_core.categorizations categorization_id="-30500"
category_id="-2120" category_id="-2120"
object_id="-10500" object_id="-10500"
category_order="2" category_order="1"
object_order="1" object_order="1"
category_index="false" category_index="false"
type="folder" /> type="folder" />

View File

@ -647,7 +647,7 @@
<ccm_core.categorizations categorization_id="-30100" <ccm_core.categorizations categorization_id="-30100"
category_id="-2110" category_id="-2110"
object_id="-10100" object_id="-10100"
category_order="2" category_order="1"
object_order="1" object_order="1"
category_index="false" category_index="false"
type="folder" /> type="folder" />

View File

@ -566,7 +566,7 @@
<ccm_core.categorizations categorization_id="-30100" <ccm_core.categorizations categorization_id="-30100"
category_id="-2300" category_id="-2300"
object_id="-10100" object_id="-10100"
category_order="2" category_order="1"
object_order="1" object_order="1"
category_index="false" category_index="false"
type="folder" /> type="folder" />

View File

@ -567,7 +567,7 @@
<ccm_core.categorizations categorization_id="-30100" <ccm_core.categorizations categorization_id="-30100"
category_id="-2120" category_id="-2120"
object_id="-10100" object_id="-10100"
category_order="2" category_order="1"
object_order="1" object_order="1"
category_index="false" category_index="false"
type="folder" /> type="folder" />