author | Michael Krelin <hacker@klever.net> | 2005-04-25 17:07:02 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2005-04-25 17:07:02 (UTC) |
commit | 33efe232e5ed39c2dcb486fc1c381f09654c0126 (patch) (side-by-side diff) | |
tree | 967b0c795cc8c407234640ed196c18c259394f6a /htdocs/view.chtml | |
parent | dc836540970e798a91ae9460690e4462365e770a (diff) | |
download | sitecing-33efe232e5ed39c2dcb486fc1c381f09654c0126.zip sitecing-33efe232e5ed39c2dcb486fc1c381f09654c0126.tar.gz sitecing-33efe232e5ed39c2dcb486fc1c381f09654c0126.tar.bz2 |
1. -svn-ed version
2. made changes necessary to get along well with recent konforka-sitecing changes
-rw-r--r-- | htdocs/view.chtml | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/htdocs/view.chtml b/htdocs/view.chtml index f729465..809c54f 100644 --- a/htdocs/view.chtml +++ b/htdocs/view.chtml @@ -5,35 +5,36 @@ <%impl> #include <iostream> #include <fstream> using namespace std; #include <sitecing/util.h> #include <sitecing/sitecing_util.h> + #include <konforka/util.h> #include <konforka/exception.h> #include "acconfig.h" </%impl> <%codemethod string title() %> return "introduction"; </%codemethod> <%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;n<source_files_count;n++) { sof = &source_files[n]; if(sof->name && 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); </%code> <div class="source"> <h1><% rfile %></h1> <ul> <%code> ifstream sf(afile.c_str()); |