From: <jbo...@li...> - 2005-10-31 15:50:43
|
Author: szimano Date: 2005-10-31 10:50:17 -0500 (Mon, 31 Oct 2005) New Revision: 1474 Modified: trunk/forge/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/plugins/AttachmentListPlugin.java Log: licenses ascii bugs Modified: trunk/forge/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/plugins/AttachmentListPlugin.java =================================================================== --- trunk/forge/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/plugins/AttachmentListPlugin.java 2005-10-31 15:46:34 UTC (rev 1473) +++ trunk/forge/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/plugins/AttachmentListPlugin.java 2005-10-31 15:50:17 UTC (rev 1474) @@ -1,24 +1,25 @@ - /* - * JBoss, Home of Professional Open Source - * Copyright 2005, JBoss Inc., and individual contributors as indicated - * by the @authors tag. See the copyright.txt in the distribution for a - * full listing of individual contributors. - * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2.1 of - * the License, or (at your option) any later version. - * - * This software is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this software; if not, write to the Free - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. - */ +/* + * JBoss, Home of Professional Open Source + * Copyright 2005, JBoss Inc., and individual contributors as indicated + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ + package org.jboss.wiki.plugins; import java.util.Set; @@ -31,14 +32,15 @@ public class AttachmentListPlugin extends WikiPlugin { private String host = ""; - + @Override public WikiPage process(WikiPage wikiPage, WikiSession wikiSession) { - host = (String)wikiSession.getAttribute("hostURL")+"/wiki/"; - String fileEditURL = (String)wikiSession.getAttribute("actionURL")+"&type=fileInfo&page="+wikiPage.getName(); - + host = (String) wikiSession.getAttribute("hostURL") + "/wiki/"; + String fileEditURL = (String) wikiSession.getAttribute("actionURL") + + "&type=fileInfo&page=" + wikiPage.getName(); + WikiPage newPage = null; - + try { newPage = (WikiPage) wikiPage.clone(); } catch (CloneNotSupportedException cl) { @@ -53,22 +55,25 @@ newContent += "\n<hr />\n<h3>Attachments:</h3>\n<table border='0'>"; for (String file : attachements) { - String href = host+newPage.getName() + "/file:" + file; - newContent += "<tr><td><a href=\""+href+"\">"+href + "</a></td>"; - newContent += "<td><a href=\""+fileEditURL+"&var1="+file+"\" ><img border=\"0\" src=\""+host+WikiCommon.wikiButtons+"/historyButton.png\" /></a></td></tr>\n"; + String href = host + newPage.getName() + "/file:" + file; + newContent += "<tr><td><a href=\"" + href + "\">" + href + + "</a></td>"; + newContent += "<td><a href=\"" + fileEditURL + "&var1=" + file + + "\" ><img border=\"0\" src=\"" + host + + WikiCommon.wikiButtons + + "/historyButton.png\" /></a></td></tr>\n"; } newContent += "</table>\n"; - + newPage.setPageContent(newContent); } return newPage; } - @Override public void init() { - + } } |