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-94f89814c4dfmaster
parent
4afbf64b16
commit
0f59c71dc5
|
|
@ -17,12 +17,10 @@
|
||||||
*/
|
*/
|
||||||
package com.arsdigita.cms.contenttypes;
|
package com.arsdigita.cms.contenttypes;
|
||||||
|
|
||||||
// import com.arsdigita.cms.CMS;
|
|
||||||
import com.arsdigita.cms.ContentItem;
|
import com.arsdigita.cms.ContentItem;
|
||||||
import com.arsdigita.cms.ContentPage;
|
import com.arsdigita.cms.ContentPage;
|
||||||
import com.arsdigita.cms.contentassets.RelatedLink;
|
import com.arsdigita.cms.contentassets.RelatedLink;
|
||||||
import com.arsdigita.cms.publicpersonalprofile.PublicPersonalProfiles;
|
import com.arsdigita.cms.publicpersonalprofile.PublicPersonalProfiles;
|
||||||
// import com.arsdigita.dispatcher.DispatcherHelper;
|
|
||||||
import com.arsdigita.domain.DomainObjectFactory;
|
import com.arsdigita.domain.DomainObjectFactory;
|
||||||
import com.arsdigita.persistence.DataCollection;
|
import com.arsdigita.persistence.DataCollection;
|
||||||
import com.arsdigita.ui.UI;
|
import com.arsdigita.ui.UI;
|
||||||
|
|
@ -174,31 +172,26 @@ public class PublicPersonalProfileXmlUtil {
|
||||||
navItem = navItemMap.get(navLinkKey);
|
navItem = navItemMap.get(navLinkKey);
|
||||||
|
|
||||||
if (navItem == null) {
|
if (navItem == null) {
|
||||||
//ToDo
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
final ContentItem targetItem = link.getTargetItem();
|
final ContentItem targetItem = link.getTargetItem();
|
||||||
if (!(targetItem instanceof PublicPersonalProfile)
|
if (!(targetItem instanceof PublicPersonalProfile)
|
||||||
&& (targetItem instanceof ContentPage)) {
|
&& (targetItem instanceof ContentPage)) {
|
||||||
final ContentPage targetPage = (ContentPage) targetItem;
|
final ContentPage targetPage = (ContentPage) targetItem;
|
||||||
/*if (!(targetPage.getContentBundle().hasInstance(GlobalizationHelper.
|
|
||||||
getNegotiatedLocale().getLanguage(),
|
if (!(targetPage.getContentBundle().hasInstance(profile.getLanguage(),
|
||||||
false))) {
|
false))) {
|
||||||
continue;
|
continue;
|
||||||
}*/
|
|
||||||
if (!(targetPage.getContentBundle().hasInstance(profile.
|
|
||||||
getLanguage(),
|
|
||||||
false))) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
navLinks.add(createNavLink(navItem, navLinkKey, targetItem));
|
navLinks.add(createNavLink(navItem, navLinkKey, targetItem));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Collections.sort(navLinks);
|
Collections.sort(navLinks);
|
||||||
|
|
||||||
for(NavLink navLink : navLinks) {
|
for (NavLink navLink : navLinks) {
|
||||||
navElem =
|
navElem =
|
||||||
navList.newChildElement("nav:category",
|
navList.newChildElement("nav:category",
|
||||||
"http://ccm.redhat.com/navigation");
|
"http://ccm.redhat.com/navigation");
|
||||||
|
|
@ -246,6 +239,7 @@ public class PublicPersonalProfileXmlUtil {
|
||||||
}
|
}
|
||||||
|
|
||||||
private class NavLink implements Comparable<NavLink> {
|
private class NavLink implements Comparable<NavLink> {
|
||||||
|
|
||||||
private PublicPersonalProfileNavItem navItem;
|
private PublicPersonalProfileNavItem navItem;
|
||||||
private String key;
|
private String key;
|
||||||
private ContentItem target;
|
private ContentItem target;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue