Überprüfung von allen Aufrufen von getPrimaryInstance() außer in Navigation abgeschlossen. Sollte jetzt, soweit ich das erkennen konnte, korrekt sein.
git-svn-id: https://svn.libreccm.org/ccm/trunk@269 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
c559db1ad7
commit
36e5dd7b66
|
|
@ -74,7 +74,7 @@ public class MultilingualItemResolver extends AbstractItemResolver implements It
|
||||||
*/
|
*/
|
||||||
protected static final String SEPARATOR = "&";
|
protected static final String SEPARATOR = "&";
|
||||||
|
|
||||||
public MultilingualItemResolver () {
|
public MultilingualItemResolver() {
|
||||||
s_log.debug("Undergoing creation");
|
s_log.debug("Undergoing creation");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -885,8 +885,7 @@ public class MultilingualItemResolver extends AbstractItemResolver implements It
|
||||||
HttpServletRequest req = Web.getRequest();
|
HttpServletRequest req = Web.getRequest();
|
||||||
final ContentItem resolved;
|
final ContentItem resolved;
|
||||||
if (req != null) {
|
if (req != null) {
|
||||||
resolved = ((ContentBundle) item)
|
resolved = ((ContentBundle) item).negotiate(req.getLocales());
|
||||||
.negotiate(req.getLocales());
|
|
||||||
} else {
|
} else {
|
||||||
// fallback to the primary instance when request is not available
|
// fallback to the primary instance when request is not available
|
||||||
resolved = ((ContentBundle) item).getPrimaryInstance();
|
resolved = ((ContentBundle) item).getPrimaryInstance();
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ package com.arsdigita.london.atoz;
|
||||||
import com.arsdigita.cms.ContentBundle;
|
import com.arsdigita.cms.ContentBundle;
|
||||||
import com.arsdigita.cms.ContentItem;
|
import com.arsdigita.cms.ContentItem;
|
||||||
import com.arsdigita.cms.ContentPage;
|
import com.arsdigita.cms.ContentPage;
|
||||||
|
import com.arsdigita.dispatcher.DispatcherHelper;
|
||||||
import com.arsdigita.persistence.DataQuery;
|
import com.arsdigita.persistence.DataQuery;
|
||||||
import com.arsdigita.persistence.Filter;
|
import com.arsdigita.persistence.Filter;
|
||||||
import com.arsdigita.persistence.OID;
|
import com.arsdigita.persistence.OID;
|
||||||
|
|
@ -58,7 +59,11 @@ public class AtoZItemGenerator extends AbstractAtoZGenerator {
|
||||||
bundle = new ContentBundle(new BigDecimal(entries.get("id")
|
bundle = new ContentBundle(new BigDecimal(entries.get("id")
|
||||||
.toString()));
|
.toString()));
|
||||||
if (bundle != null) {
|
if (bundle != null) {
|
||||||
item = bundle.getPrimaryInstance();
|
/* Fix by Quasimodo*/
|
||||||
|
/* getPrimaryInstance doesn't negotiate the language of the content item */
|
||||||
|
/* item = bundle.getPrimaryInstance(); */
|
||||||
|
item = bundle.negotiate(DispatcherHelper.getRequest().getLocales());
|
||||||
|
|
||||||
if (item != null) {
|
if (item != null) {
|
||||||
// this is necessary because aliases refer to the non-live
|
// this is necessary because aliases refer to the non-live
|
||||||
// version,
|
// version,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue