BugFix für Anzeige nicht publizierter Inhalte im PPP (Ticket #1361).

git-svn-id: https://svn.libreccm.org/ccm/trunk@1845 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2012-09-01 11:21:57 +00:00
parent 4afbf64b16
commit 0f59c71dc5
1 changed files with 31 additions and 37 deletions

View File

@ -17,12 +17,10 @@
*/
package com.arsdigita.cms.contenttypes;
// import com.arsdigita.cms.CMS;
import com.arsdigita.cms.ContentItem;
import com.arsdigita.cms.ContentPage;
import com.arsdigita.cms.contentassets.RelatedLink;
import com.arsdigita.cms.publicpersonalprofile.PublicPersonalProfiles;
// import com.arsdigita.dispatcher.DispatcherHelper;
import com.arsdigita.domain.DomainObjectFactory;
import com.arsdigita.persistence.DataCollection;
import com.arsdigita.ui.UI;
@ -174,27 +172,22 @@ public class PublicPersonalProfileXmlUtil {
navItem = navItemMap.get(navLinkKey);
if (navItem == null) {
//ToDo
continue;
}
final ContentItem targetItem = link.getTargetItem();
if (!(targetItem instanceof PublicPersonalProfile)
&& (targetItem instanceof ContentPage)) {
final ContentPage targetPage = (ContentPage) targetItem;
/*if (!(targetPage.getContentBundle().hasInstance(GlobalizationHelper.
getNegotiatedLocale().getLanguage(),
if (!(targetPage.getContentBundle().hasInstance(profile.getLanguage(),
false))) {
continue;
}*/
if (!(targetPage.getContentBundle().hasInstance(profile.
getLanguage(),
false))) {
continue;
}
}
navLinks.add(createNavLink(navItem, navLinkKey, targetItem));
}
}
Collections.sort(navLinks);
@ -246,6 +239,7 @@ public class PublicPersonalProfileXmlUtil {
}
private class NavLink implements Comparable<NavLink> {
private PublicPersonalProfileNavItem navItem;
private String key;
private ContentItem target;