From 291e6bbe686d40426f581c66e8ec3779ff78ad9d Mon Sep 17 00:00:00 2001 From: jensp Date: Wed, 7 Mar 2012 14:05:24 +0000 Subject: [PATCH] =?UTF-8?q?Fix=20f=C3=BCr=20Publizierenprozess:=20ContentB?= =?UTF-8?q?undle=20wird=20jetzt=20ebenfalls=20republiziert.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn.libreccm.org/ccm/trunk@1536 8810af33-2d31-482b-a856-94f89814c4df --- .../src/com/arsdigita/cms/ContentItem.java | 20 +++++++++++++------ .../ui/lifecycle/ItemLifecycleItemPane.java | 7 ++++--- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/ccm-cms/src/com/arsdigita/cms/ContentItem.java b/ccm-cms/src/com/arsdigita/cms/ContentItem.java index 561c86580..b9df7a1e2 100755 --- a/ccm-cms/src/com/arsdigita/cms/ContentItem.java +++ b/ccm-cms/src/com/arsdigita/cms/ContentItem.java @@ -184,6 +184,7 @@ import java.util.Set; * @author Jack Chung * @author Michael Pih * @author Stanislav Freidin <sfreidin@redhat.com> + * @author Jens Pelzetter * * @version $Id: ContentItem.java 2218 2011-06-22 23:55:36Z pboy $ */ @@ -440,7 +441,8 @@ public class ContentItem extends VersionedACSObject implements CustomCopy { } } - /* * + /* + * * * removed cg - object observer sets context based on parent whenever parent * is updated * @@ -616,7 +618,9 @@ public class ContentItem extends VersionedACSObject implements CustomCopy { * The item's root is the ancestor reachable through repeated * getParent() calls whose parent is * null. This is usually a folder, but may be any - * {@see com.arsdigita.kernel.ACSObject}. + * { + * + * @see com.arsdigita.kernel.ACSObject}. * * Note that the name of the root folder of the content section where the * item resides is not included in the path. @@ -1881,9 +1885,13 @@ public class ContentItem extends VersionedACSObject implements CustomCopy { ContentBundle bundle = (ContentBundle) parent; ContentBundle liveBundle = (ContentBundle) bundle. getPublicVersion(); + //jensp 2012-03-07 Changes to the ContentBundle were not + //published because the ContentBundle was not republished. + //Moved the next lines out of the if below to enable + //republishing of the ContentBundle + liveBundle = + (ContentBundle) bundle.createPendingVersion(null); if (liveBundle == null) { - liveBundle = - (ContentBundle) bundle.createPendingVersion(null); } else { Set liveCatSet = new HashSet(); Set draftCatSet = new HashSet(); @@ -2197,8 +2205,8 @@ public class ContentItem extends VersionedACSObject implements CustomCopy { * {@link #getExtraXMLGenerators()}. But beware: The page state passed to * generators returned by this method will may be null.

* - * @return A list of all extra XML Generators for lists views of - * this content item. + * @return A list of all extra XML Generators for lists views of this + * content item. */ public List getExtraListXMLGenerators() { return new ArrayList(); diff --git a/ccm-cms/src/com/arsdigita/cms/ui/lifecycle/ItemLifecycleItemPane.java b/ccm-cms/src/com/arsdigita/cms/ui/lifecycle/ItemLifecycleItemPane.java index cd80d2dc6..30a23c974 100755 --- a/ccm-cms/src/com/arsdigita/cms/ui/lifecycle/ItemLifecycleItemPane.java +++ b/ccm-cms/src/com/arsdigita/cms/ui/lifecycle/ItemLifecycleItemPane.java @@ -44,6 +44,7 @@ import com.arsdigita.bebop.form.Submit; import com.arsdigita.cms.CMS; import com.arsdigita.cms.CMSConfig; import com.arsdigita.cms.ContentItem; +import com.arsdigita.cms.ContentPage; import com.arsdigita.cms.ContentSection; import com.arsdigita.cms.SecurityManager; import com.arsdigita.cms.Workspace; @@ -304,7 +305,7 @@ class ItemLifecycleItemPane extends BaseItemPane { newInstance(OID.valueOf(itemOid)); PublishLock.getInstance().lock(item); republish(item, false); - PublishLock.getInstance().unlock(item); + PublishLock.getInstance().unlock(item); } } } @@ -593,7 +594,7 @@ class ItemLifecycleItemPane extends BaseItemPane { private void doRepublish() { final ContentItem item = (ContentItem) DomainObjectFactory. newInstance(OID.valueOf(itemOid)); - republish(item, false); + republish(item, false); } public void run() { @@ -623,7 +624,7 @@ class ItemLifecycleItemPane extends BaseItemPane { private void doRepublishAndReset() { final ContentItem item = (ContentItem) DomainObjectFactory. newInstance(OID.valueOf(itemOid)); - republish(item, true); + republish(item, true); } public void run() {