Fix für Publizierenprozess: ContentBundle wird jetzt ebenfalls republiziert.

git-svn-id: https://svn.libreccm.org/ccm/trunk@1536 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2012-03-07 14:05:24 +00:00
parent 79cf36996a
commit 291e6bbe68
2 changed files with 18 additions and 9 deletions

View File

@ -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
* <code>getParent()</code> calls whose parent is
* <code>null</code>. 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. </p>
*
* @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<ExtraXMLGenerator> getExtraListXMLGenerators() {
return new ArrayList<ExtraXMLGenerator>();

View File

@ -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() {