Update of /cvsroot/webmacro/wiki/src/org/tcdi/opensource/wiki/servlet In directory sc8-pr-cvs1:/tmp/cvs-serv14910/src/org/tcdi/opensource/wiki/servlet Modified Files: RecentChangesAction.java WikiServlet.java Added Files: IndexPageAction.java PageTreeAction.java Log Message: - fix bug where page names with numbers were not accessible (reported by Keats) - cleanup user admin screens - add a "PageTree" page that displays a tree (based on links) of all pages in the site - add a "IndexPage" page that displays a simple index of all pages, group by first letter (suggested by Christian) - update webmacro.jar to whatever we have in CVS as of today (living dangerously!) --- NEW FILE: PageTreeAction.java --- /** * The contents of this file are subject to the Mozilla Public * License Version 1.1 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * The Original Code is Wiki. * * The Initial Developer of the Original Code is Technology Concepts * and Design, Inc. * Copyright (C) 2000 Technology Concepts and Design, Inc. All * Rights Reserved. * * Contributor(s): Lane Sharman (OpenDoors Software) * Justin Wells (Semiotek Inc.) * Eric B. Ridge (Technology Concepts and Design, Inc.) * * Alternatively, the contents of this file may be used under the * terms of the GNU General Public License Version 2 or later (the * "GPL"), in which case the provisions of the GPL are applicable * instead of those above. If you wish to allow use of your * version of this file only under the terms of the GPL and not to * allow others to use your version of this file under the MPL, * indicate your decision by deleting the provisions above and * replace them with the notice and other provisions required by * the GPL. If you do not delete the provisions above, a recipient * may use your version of this file under either the MPL or the * GPL. * * * This product includes sofware developed by OpenDoors Software. * * This product includes software developed by Justin Wells and Semiotek Inc. * for use in the WebMacro ServletFramework (http://www.webmacro.org). */ package org.tcdi.opensource.wiki.servlet; import org.tcdi.opensource.wiki.*; import org.webmacro.servlet.WebContext; public class PageTreeAction implements PageAction { public boolean accept(WikiSystem wiki, WebContext wc, WikiUser user) { return wc.getRequest().getRequestURI().endsWith ("PageTree"); } public String getWikiPageName(WikiSystem wiki, WebContext wc) { return "PageTree"; } public void perform(WikiSystem wiki, WebContext wc, WikiUser user, WikiPage page) throws PageAction.PageActionException { wc.put ("PageTree", wiki.getPageTree()); } public String getTemplateName(WikiSystem wiki, WikiPage page) { return wiki.getProperties().getProperty("PageTreeAction.Template"); } } Index: RecentChangesAction.java =================================================================== RCS file: /cvsroot/webmacro/wiki/src/org/tcdi/opensource/wiki/servlet/RecentChangesAction.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** RecentChangesAction.java 22 Nov 2002 04:48:06 -0000 1.3 --- RecentChangesAction.java 2 Jul 2003 03:01:52 -0000 1.4 *************** *** 137,141 **** */ public String getWikiPageName(WikiSystem wiki, WebContext wc) { ! return null; } } --- 137,141 ---- */ public String getWikiPageName(WikiSystem wiki, WebContext wc) { ! return "RecentChanges"; } } Index: WikiServlet.java =================================================================== RCS file: /cvsroot/webmacro/wiki/src/org/tcdi/opensource/wiki/servlet/WikiServlet.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** WikiServlet.java 27 Nov 2002 06:21:41 -0000 1.3 --- WikiServlet.java 2 Jul 2003 03:01:52 -0000 1.4 *************** *** 52,56 **** import org.tcdi.opensource.wiki.*; - import org.tcdi.opensource.util.*; /** --- 52,55 ---- *************** *** 73,77 **** private PageActionManager _actionManager; - /** * do necessary statup work like creating a Log and configuring --- 72,75 ---- *************** *** 133,136 **** --- 131,135 ---- // something bad happened while performing the action // TODO: Handle error and error template ourselves + e.printStackTrace(); throw new HandlerException (e.toString()); } finally { |