|
From: Alexander G. <gaf...@us...> - 2006-01-18 16:22:54
|
Update of /cvsroot/cobricks/cobricks2/src/org/cobricks/portal In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv928/src/org/cobricks/portal Modified Files: PortalManagerImpl.java Log Message: Wiki functionality added Index: PortalManagerImpl.java =================================================================== RCS file: /cvsroot/cobricks/cobricks2/src/org/cobricks/portal/PortalManagerImpl.java,v retrieving revision 1.70 retrieving revision 1.71 diff -u -d -r1.70 -r1.71 --- PortalManagerImpl.java 16 Jan 2006 09:23:57 -0000 1.70 +++ PortalManagerImpl.java 18 Jan 2006 16:22:43 -0000 1.71 @@ -393,7 +393,7 @@ String itemclass = null; try { itemclass = (String)page.getAttribute("itemclass"); - + //Get verseionid of page versionid = Integer.valueOf( portalRequest.getRequestParameter("versionid")); @@ -414,20 +414,23 @@ Map pc = null; + if(itemclass != null && itemclass.equals("wikipage")) { pc = new HashMap(); String content = null; if (versionid != null) { content = itemManager.getContentVersion( - page.getLocalId(), lang, versionid.intValue()); + page.getLocalId(), pageLanguage, versionid.intValue()); if(content == null) { + pageLanguage = defaultLanguage; content = itemManager.getContentVersion( page.getLocalId(), defaultLanguage, versionid.intValue()); } } else { content = this.getHighestContentVersion( - page.getLocalId(), lang); + page.getLocalId(), pageLanguage); if(content == null) { + pageLanguage = defaultLanguage; content = this.getHighestContentVersion( page.getLocalId(), defaultLanguage); } @@ -436,13 +439,6 @@ //Parse the wiki-content content = Utility.parse(content); -// content = content+"<br>"; -// content = Utility.insertEditLink(page.getLocalId(), -// content, content.length()); -// content = content+"<br>"; -// content = Utility.insertHistoryLink(page.getLocalId(), lang, -// content, content.length()); -// content = Utility.deleteToken(content); pc.put(pageLanguage, content); } |