From 33efe232e5ed39c2dcb486fc1c381f09654c0126 Mon Sep 17 00:00:00 2001 From: Michael Krelin Date: Mon, 25 Apr 2005 17:07:02 +0000 Subject: 1. -svn-ed version 2. made changes necessary to get along well with recent konforka-sitecing changes --- diff --git a/configure.ac b/configure.ac index e60f519..80f6321 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT([sitecing-showcase], [0.0.1], [sitecing-bugs@klever.net]) +AC_INIT([sitecing-showcase], [0.0.1-svn], [sitecing-bugs@klever.net]) AC_CONFIG_SRCDIR([htdocs/index.chtml]) AC_CONFIG_AUX_DIR([aux]) AC_CONFIG_HEADER([include/acconfig.h]) diff --git a/htdocs/handlers/exception_dev b/htdocs/handlers/exception_dev index d8c84e1..d62f462 100644 --- a/htdocs/handlers/exception_dev +++ b/htdocs/handlers/exception_dev @@ -10,6 +10,7 @@ #include #include #include + #include #include %%var string message; @@ -254,7 +255,7 @@ } } if((oel>0 && !oef.empty()) && (oel!=error_line || oef!=error_file)) { - string ef = "/"+sitecing::combine_path(root_source+component,oef); + string ef = "/"+konforka::combine_path(root_source+component,oef); report_error(ef,oel,remove_roots(cumulative)); cumulative.clear(); } @@ -264,7 +265,7 @@ cumulative += line; } if(!(cumulative.empty() || error_file.empty() || error_line<0)) { - error_file = "/"+sitecing::combine_path(root_source+component,error_file); + error_file = "/"+konforka::combine_path(root_source+component,error_file); report_error(error_file,error_line,remove_roots(cumulative)); } } @@ -318,7 +319,7 @@ <%codemethod string strip_roots(const string& filename) %> - string np = sitecing::normalize_path(filename); + string np = konforka::normalize_path(filename); try{ return sitecing::strip_prefix(np,root_source); }catch(sitecing::utility_no_prefix& e){ } diff --git a/htdocs/sources.chtml b/htdocs/sources.chtml index 268b0e0..57a03e9 100644 --- a/htdocs/sources.chtml +++ b/htdocs/sources.chtml @@ -4,6 +4,7 @@ %%pragma main=page <%impl> #include + #include <%constructor> b_strict = false; @@ -31,9 +32,9 @@ <%code> - string rfile = sitecing::normalize_path( + string rfile = konforka::normalize_path( sitecing::strip_prefix(__CGI->get_meta("PATH_INFO"),"/sources.chtml"), - sitecing::restrict_dotdot|sitecing::strip_leading_slash ); + konforka::restrict_dotdot|konforka::strip_leading_slash ); if(rfile.empty()) rfile = "about:blank"; else diff --git a/htdocs/view.chtml b/htdocs/view.chtml index f729465..809c54f 100644 --- a/htdocs/view.chtml +++ b/htdocs/view.chtml @@ -8,6 +8,7 @@ using namespace std; #include #include + #include #include #include "acconfig.h" @@ -16,21 +17,21 @@ <%method void body() %> <%code> - string rfile = sitecing::normalize_path( + string rfile = konforka::normalize_path( sitecing::strip_prefix(__CGI->get_meta("PATH_INFO"),"/view.chtml"), - sitecing::restrict_dotdot|sitecing::strip_leading_slash ); + konforka::restrict_dotdot|konforka::strip_leading_slash ); sourcefile_t *sof = 0; for(int n=0;nname && sof->dir) { - if(sitecing::normalize_path(sitecing::combine_path(sof->dir,sof->name,0),sitecing::strip_leading_slash)==rfile) + if(konforka::normalize_path(konforka::combine_path(sof->dir,sof->name,0),konforka::strip_leading_slash)==rfile) break; } sof = 0; } if(!sof) throw konforka::exception(CODEPOINT,"no access to the file allowed"); - string afile = sitecing::combine_path(WEB_ROOT,rfile,0); + string afile = konforka::combine_path(WEB_ROOT,rfile,0);

<% rfile %>

-- cgit v0.9.0.2