|
From: Michael K. <ko...@us...> - 2006-05-31 06:04:21
|
Update of /cvsroot/cobricks/cobricks2/src/org/cobricks/portal In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv29264/src/org/cobricks/portal Modified Files: PortalManagerImpl.java PortalPresenter.java Log Message: Index: PortalPresenter.java =================================================================== RCS file: /cvsroot/cobricks/cobricks2/src/org/cobricks/portal/PortalPresenter.java,v retrieving revision 1.40 retrieving revision 1.41 diff -u -d -r1.40 -r1.41 --- PortalPresenter.java 29 May 2006 15:57:29 -0000 1.40 +++ PortalPresenter.java 31 May 2006 06:04:18 -0000 1.41 @@ -376,32 +376,6 @@ /** - * Print some header information for html pages. This function - * will be called in the Velocity header files. - */ - public String printHeader(PortalRequest portalRequest, String title) - { - StringBuffer sb = new StringBuffer(""); - sb.append("<title>"); - sb.append(title); - sb.append("</title>\n"); - // and now a base tag - this is needed if templates are loaded - // from servlet actions - in this case the browser does not - // know the correct base - String useragent = portalRequest. - getHttpServletRequest().getHeader("user-agent"); - if (!useragent.startsWith("Mozilla/4")) - sb.append("<base href=\""+portalRequest.getBaseUrl()+"\">"); - return sb.toString(); - } - - public String printHeader(PortalRequest portalRequest) - { - return printHeader(portalRequest, "Cobricks-2"); - } - - - /** * Print icons for the other possible language versions * of this page. */ Index: PortalManagerImpl.java =================================================================== RCS file: /cvsroot/cobricks/cobricks2/src/org/cobricks/portal/PortalManagerImpl.java,v retrieving revision 1.82 retrieving revision 1.83 diff -u -d -r1.82 -r1.83 --- PortalManagerImpl.java 30 May 2006 06:54:40 -0000 1.82 +++ PortalManagerImpl.java 31 May 2006 06:04:18 -0000 1.83 @@ -98,7 +98,7 @@ static Logger logger = Logger.getLogger(PortalManagerImpl.class); static String COMP_NAME = "Cobricks-2 Portal Component"; - static String COMP_VERSION = "V0.4 (Feb. 2006)"; + static String COMP_VERSION = "V0.4 (Jun. 2006)"; static String ROOTPORTALFOLDER = "ROOT"; |
|
From: Michael K. <ko...@us...> - 2006-09-14 12:21:29
|
Update of /cvsroot/cobricks/cobricks2/src/org/cobricks/portal In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv21101/portal Modified Files: PortalManagerImpl.java PortalPresenter.java Log Message: Index: PortalPresenter.java =================================================================== RCS file: /cvsroot/cobricks/cobricks2/src/org/cobricks/portal/PortalPresenter.java,v retrieving revision 1.44 retrieving revision 1.45 diff -u -d -r1.44 -r1.45 --- PortalPresenter.java 13 Sep 2006 12:51:23 -0000 1.44 +++ PortalPresenter.java 14 Sep 2006 12:21:26 -0000 1.45 @@ -520,7 +520,7 @@ HttpServletRequest request = portalRequest.getHttpServletRequest(); String uri = request.getRequestURI(); - logger.info("navigation: "+uri); + uri = portalRequest.getPagePath()+portalRequest.getPageName(); int poslast = uri.lastIndexOf("/"); String pagename = ""; String fullpagename = ""; @@ -542,7 +542,7 @@ PortalFolder pf = portalManager.getPortalFolder(tmpurl); String tmpname = tmps; if (pf != null) - tmpname = pf.getTitle("$!lang"); + tmpname = pf.getTitle(portalRequest.getLang()); result.append(" → "); result.append("<a href=\""); result.append(tmpurl); @@ -551,7 +551,7 @@ result.append("</a>"); } if (pagename!=null && pagename.length()>0 && - (!(pagename.startsWith("index.")))) { + (!(pagename.equals("index")))) { result.append(" → "); result.append("<a href=\""); tmpurl = tmpurl + fullpagename; Index: PortalManagerImpl.java =================================================================== RCS file: /cvsroot/cobricks/cobricks2/src/org/cobricks/portal/PortalManagerImpl.java,v retrieving revision 1.85 retrieving revision 1.86 diff -u -d -r1.85 -r1.86 --- PortalManagerImpl.java 12 Sep 2006 12:40:50 -0000 1.85 +++ PortalManagerImpl.java 14 Sep 2006 12:21:26 -0000 1.86 @@ -470,20 +470,11 @@ Object content = page.getPageContent(lang); if (content == null) { - logger.warn("Failed getting content for page "+pagePath+pageName - +","+lang+" - sending error 404"); - /* - pagePath = notFoundPath; - pageName = "notfound.html"; - int pos = pagePath.indexOf("/"); - if (pos > -1) { - pageName = pagePath.substring(pos+1); - pagePath = pagePath.substring(0, pos+1); + if (!pageName.equals("favicon.ico")) { + logger.warn("Failed getting content for page " + +pagePath+pageName + +","+lang+" - sending error 404"); } - page = getObject(pagePath, pageName); - printPage(portalRequest, page, out); - return; - */ HttpServletResponse response = portalRequest.getHttpServletResponse(); response.setStatus(404); |
|
From: Michael K. <ko...@us...> - 2006-10-05 15:16:47
|
Update of /cvsroot/cobricks/cobricks2/src/org/cobricks/portal In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv27670 Modified Files: PortalManagerImpl.java PortalPresenter.java Log Message: Index: PortalPresenter.java =================================================================== RCS file: /cvsroot/cobricks/cobricks2/src/org/cobricks/portal/PortalPresenter.java,v retrieving revision 1.46 retrieving revision 1.47 diff -u -d -r1.46 -r1.47 --- PortalPresenter.java 5 Oct 2006 15:07:45 -0000 1.46 +++ PortalPresenter.java 5 Oct 2006 15:16:39 -0000 1.47 @@ -194,7 +194,6 @@ public String parse(String filename, PortalRequest portalRequest) { logger.debug("parse("+filename+")"); - String pageContent = portalManager.getPageContent(filename, portalRequest); try { @@ -213,7 +212,6 @@ String defaultfilename) { logger.debug("parse("+filename+")"); - String pageContent = portalManager.getPageContent(filename, portalRequest); if (pageContent == null || pageContent.length()<1) Index: PortalManagerImpl.java =================================================================== RCS file: /cvsroot/cobricks/cobricks2/src/org/cobricks/portal/PortalManagerImpl.java,v retrieving revision 1.89 retrieving revision 1.90 diff -u -d -r1.89 -r1.90 --- PortalManagerImpl.java 5 Oct 2006 15:07:45 -0000 1.89 +++ PortalManagerImpl.java 5 Oct 2006 15:16:39 -0000 1.90 @@ -286,6 +286,9 @@ /** * Get the content of a page referenced directly or indirectly from * the current context (use the correct language etc ...) + * @input filename The file name can either be given in an absolute + * manner (e.g. "/pageheader.html") or relative to the folder from + * which the current page has been loaded */ public String getPageContent(String filename, PortalRequest portalRequest) { @@ -620,7 +623,6 @@ pageName = pagePath.substring(pos+1); pagePath = pagePath.substring(0, pos+1); } - portalRequest.setPageName(pagePath, pageName); page = (PortalPage)getObject(pagePath, pageName); pc = page.getStringPageContent(lang); if (pc == null) { |
|
From: Michael K. <ko...@us...> - 2006-12-18 16:39:09
|
Update of /cvsroot/cobricks/cobricks2/src/org/cobricks/portal In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv21447/org/cobricks/portal Modified Files: PortalManagerImpl.java PortalPresenter.java Log Message: Index: PortalPresenter.java =================================================================== RCS file: /cvsroot/cobricks/cobricks2/src/org/cobricks/portal/PortalPresenter.java,v retrieving revision 1.56 retrieving revision 1.57 diff -u -d -r1.56 -r1.57 --- PortalPresenter.java 10 Dec 2006 18:35:39 -0000 1.56 +++ PortalPresenter.java 18 Dec 2006 16:39:04 -0000 1.57 @@ -692,6 +692,7 @@ String xpath = "/item[itemclass~'portalpage'] and " +"/item/folders/category/id="+folderid.trim(); List items = itemManager.searchItems(xpath); + Collections.sort(items); return items; } @@ -703,6 +704,7 @@ String xpath = "/item[itemclass~'portalpage'] and " +"/item/folders/category/id="+pf.getId(); List items = itemManager.searchItems(xpath); + Collections.sort(items); return items; } Index: PortalManagerImpl.java =================================================================== RCS file: /cvsroot/cobricks/cobricks2/src/org/cobricks/portal/PortalManagerImpl.java,v retrieving revision 1.94 retrieving revision 1.95 diff -u -d -r1.94 -r1.95 --- PortalManagerImpl.java 18 Dec 2006 07:45:15 -0000 1.94 +++ PortalManagerImpl.java 18 Dec 2006 16:39:04 -0000 1.95 @@ -631,6 +631,9 @@ pc = new HashMap(); pc.put("en", "Failed loading "+notFoundPath); } + HttpServletResponse response = + portalRequest.getHttpServletResponse(); + response.setStatus(404); } else { // update page read statistics portalStats.addPageRead(pagePath, pageName); @@ -774,8 +777,9 @@ // check if the pagePath does exist (there is a context object // for this path) PortalFolder c = getPortalFolder(pagePath); - if (c == null) + if (c == null) { throw new CobricksException("portal", "nopath", ""); + } // check if the page already exits String xpath = "/item[itemclass~'portalobject'] and " |