CCM NG/ccm-cms: Some bugfixes

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

View File

@ -881,6 +881,8 @@ public class ContentItemManager {
liveItem.setLifecycle(lifecycle);
liveItem.setWorkflow(draftItem.getWorkflow());
contentItemRepo.save(liveItem);
final List<Category> oldCategories = liveItem
.getCategories()
@ -894,12 +896,16 @@ public class ContentItemManager {
throw new RuntimeException(ex);
}
});
contentItemRepo.save(liveItem);
draftItem.getCategories().forEach(categorization -> categoryManager
.addObjectToCategory(liveItem,
categorization.getCategory(),
categorization.getType()));
contentItemRepo.save(liveItem);
for (int i = 0; i < draftItem.getAttachments().size(); i++) {
final AttachmentList sourceList = draftItem.getAttachments().get(i);
@ -968,10 +974,9 @@ public class ContentItemManager {
entityManager.merge(targetList);
}
}
contentItemRepo.save(liveItem);
// for (AttachmentList attachmentList : item.getAttachments()) {
// copyAttachmentList(attachmentList, liveItem);
// }
final BeanInfo beanInfo;
try {
beanInfo = Introspector.getBeanInfo(item.getClass());

View File

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

View File

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

View File

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

View File

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

View File

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