Author: tmortagne Date: 2007-12-06 14:25:27 +0100 (Thu, 06 Dec 2007) New Revision: 6309
Modified: xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/web/ExportURLFactory.java Log: XWIKI-564: Export pages in HTML, in a zip file * URL to of a page targeting itself is not converted (like "Home" link when in home page). Modified: xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/web/ExportURLFactory.java =================================================================== --- xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/web/ExportURLFactory.java 2007-12-06 11:53:09 UTC (rev 6308) +++ xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/web/ExportURLFactory.java 2007-12-06 13:25:27 UTC (rev 6309) @@ -170,16 +170,18 @@ public URL createURL(String web, String name, String action, String querystring, String anchor, String xwikidb, XWikiContext context) { + String wikiname = + xwikidb == null ? context.getDatabase().toLowerCase() : xwikidb.toLowerCase(); + try { - if (this.exportedPages.contains((xwikidb == null ? context.getDatabase() - .toLowerCase() : xwikidb.toLowerCase()) - + XWikiDocument.DB_SPACE_SEP + web + XWikiDocument.SPACE_NAME_SEP) - && !"view".equals(action) && context.getLinksAction() == null) { - StringBuffer newpath = new StringBuffer(servletPath); + if (this.exportedPages.contains(wikiname + XWikiDocument.DB_SPACE_SEP + web + + XWikiDocument.SPACE_NAME_SEP + name) + && "view".equals(action) && context.getLinksAction() == null) { + StringBuffer newpath = new StringBuffer(); newpath.append("file://"); - newpath.append(xwikidb.toLowerCase()); + newpath.append(wikiname); newpath.append("."); newpath.append(web); newpath.append("."); _______________________________________________ notifications mailing list notifications@xwiki.org http://lists.xwiki.org/mailman/listinfo/notifications