-rw-r--r-- | htdocs/handlers/exception_dev | 7 | ||||
-rw-r--r-- | htdocs/sources.chtml | 5 | ||||
-rw-r--r-- | htdocs/view.chtml | 9 |
3 files changed, 12 insertions, 9 deletions
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 | |||
@@ -9,8 +9,9 @@ | |||
9 | #include <cxxabi.h> | 9 | #include <cxxabi.h> |
10 | #include <sitecing/sitecing_util.h> | 10 | #include <sitecing/sitecing_util.h> |
11 | #include <sitecing/util.h> | 11 | #include <sitecing/util.h> |
12 | #include <sitecing/magic.h> | 12 | #include <sitecing/magic.h> |
13 | #include <konforka/util.h> | ||
13 | #include <konforka/exception.h> | 14 | #include <konforka/exception.h> |
14 | </%impl> | 15 | </%impl> |
15 | %%var string message; | 16 | %%var string message; |
16 | %%var string root_source; | 17 | %%var string root_source; |
@@ -253,9 +254,9 @@ | |||
253 | } | 254 | } |
254 | } | 255 | } |
255 | } | 256 | } |
256 | if((oel>0 && !oef.empty()) && (oel!=error_line || oef!=error_file)) { | 257 | if((oel>0 && !oef.empty()) && (oel!=error_line || oef!=error_file)) { |
257 | string ef = "/"+sitecing::combine_path(root_source+component,oef); | 258 | string ef = "/"+konforka::combine_path(root_source+component,oef); |
258 | report_error(ef,oel,remove_roots(cumulative)); | 259 | report_error(ef,oel,remove_roots(cumulative)); |
259 | cumulative.clear(); | 260 | cumulative.clear(); |
260 | } | 261 | } |
261 | } | 262 | } |
@@ -263,9 +264,9 @@ | |||
263 | cumulative += '\n'; | 264 | cumulative += '\n'; |
264 | cumulative += line; | 265 | cumulative += line; |
265 | } | 266 | } |
266 | if(!(cumulative.empty() || error_file.empty() || error_line<0)) { | 267 | if(!(cumulative.empty() || error_file.empty() || error_line<0)) { |
267 | error_file = "/"+sitecing::combine_path(root_source+component,error_file); | 268 | error_file = "/"+konforka::combine_path(root_source+component,error_file); |
268 | report_error(error_file,error_line,remove_roots(cumulative)); | 269 | report_error(error_file,error_line,remove_roots(cumulative)); |
269 | } | 270 | } |
270 | } | 271 | } |
271 | </%code> | 272 | </%code> |
@@ -317,9 +318,9 @@ | |||
317 | </div> | 318 | </div> |
318 | </div> | 319 | </div> |
319 | </%method> | 320 | </%method> |
320 | <%codemethod string strip_roots(const string& filename) %> | 321 | <%codemethod string strip_roots(const string& filename) %> |
321 | string np = sitecing::normalize_path(filename); | 322 | string np = konforka::normalize_path(filename); |
322 | try{ | 323 | try{ |
323 | return sitecing::strip_prefix(np,root_source); | 324 | return sitecing::strip_prefix(np,root_source); |
324 | }catch(sitecing::utility_no_prefix& e){ } | 325 | }catch(sitecing::utility_no_prefix& e){ } |
325 | try{ | 326 | try{ |
diff --git a/htdocs/sources.chtml b/htdocs/sources.chtml index 268b0e0..57a03e9 100644 --- a/htdocs/sources.chtml +++ b/htdocs/sources.chtml | |||
@@ -3,8 +3,9 @@ | |||
3 | %%derive sources = "/ancestry/sources.chtml"; | 3 | %%derive sources = "/ancestry/sources.chtml"; |
4 | %%pragma main=page | 4 | %%pragma main=page |
5 | <%impl> | 5 | <%impl> |
6 | #include <sitecing/sitecing_util.h> | 6 | #include <sitecing/sitecing_util.h> |
7 | #include <konforka/util.h> | ||
7 | </%impl> | 8 | </%impl> |
8 | <%constructor> | 9 | <%constructor> |
9 | b_strict = false; | 10 | b_strict = false; |
10 | PN_PREV("/quickref/metasyntax","syntax","meta syntax"); | 11 | PN_PREV("/quickref/metasyntax","syntax","meta syntax"); |
@@ -30,11 +31,11 @@ | |||
30 | % } | 31 | % } |
31 | </ul> | 32 | </ul> |
32 | 33 | ||
33 | <%code> | 34 | <%code> |
34 | string rfile = sitecing::normalize_path( | 35 | string rfile = konforka::normalize_path( |
35 | sitecing::strip_prefix(__CGI->get_meta("PATH_INFO"),"/sources.chtml"), | 36 | sitecing::strip_prefix(__CGI->get_meta("PATH_INFO"),"/sources.chtml"), |
36 | sitecing::restrict_dotdot|sitecing::strip_leading_slash ); | 37 | konforka::restrict_dotdot|konforka::strip_leading_slash ); |
37 | if(rfile.empty()) | 38 | if(rfile.empty()) |
38 | rfile = "about:blank"; | 39 | rfile = "about:blank"; |
39 | else | 40 | else |
40 | rfile = "/view/"+rfile; | 41 | rfile = "/view/"+rfile; |
diff --git a/htdocs/view.chtml b/htdocs/view.chtml index f729465..809c54f 100644 --- a/htdocs/view.chtml +++ b/htdocs/view.chtml | |||
@@ -7,31 +7,32 @@ | |||
7 | #include <fstream> | 7 | #include <fstream> |
8 | using namespace std; | 8 | using namespace std; |
9 | #include <sitecing/util.h> | 9 | #include <sitecing/util.h> |
10 | #include <sitecing/sitecing_util.h> | 10 | #include <sitecing/sitecing_util.h> |
11 | #include <konforka/util.h> | ||
11 | #include <konforka/exception.h> | 12 | #include <konforka/exception.h> |
12 | #include "acconfig.h" | 13 | #include "acconfig.h" |
13 | </%impl> | 14 | </%impl> |
14 | <%codemethod string title() %> | 15 | <%codemethod string title() %> |
15 | return "introduction"; | 16 | return "introduction"; |
16 | </%codemethod> | 17 | </%codemethod> |
17 | <%method void body() %> | 18 | <%method void body() %> |
18 | <%code> | 19 | <%code> |
19 | string rfile = sitecing::normalize_path( | 20 | string rfile = konforka::normalize_path( |
20 | sitecing::strip_prefix(__CGI->get_meta("PATH_INFO"),"/view.chtml"), | 21 | sitecing::strip_prefix(__CGI->get_meta("PATH_INFO"),"/view.chtml"), |
21 | sitecing::restrict_dotdot|sitecing::strip_leading_slash ); | 22 | konforka::restrict_dotdot|konforka::strip_leading_slash ); |
22 | sourcefile_t *sof = 0; | 23 | sourcefile_t *sof = 0; |
23 | for(int n=0;n<source_files_count;n++) { | 24 | for(int n=0;n<source_files_count;n++) { |
24 | sof = &source_files[n]; | 25 | sof = &source_files[n]; |
25 | if(sof->name && sof->dir) { | 26 | if(sof->name && sof->dir) { |
26 | if(sitecing::normalize_path(sitecing::combine_path(sof->dir,sof->name,0),sitecing::strip_leading_slash)==rfile) | 27 | if(konforka::normalize_path(konforka::combine_path(sof->dir,sof->name,0),konforka::strip_leading_slash)==rfile) |
27 | break; | 28 | break; |
28 | } | 29 | } |
29 | sof = 0; | 30 | sof = 0; |
30 | } | 31 | } |
31 | if(!sof) | 32 | if(!sof) |
32 | throw konforka::exception(CODEPOINT,"no access to the file allowed"); | 33 | throw konforka::exception(CODEPOINT,"no access to the file allowed"); |
33 | string afile = sitecing::combine_path(WEB_ROOT,rfile,0); | 34 | string afile = konforka::combine_path(WEB_ROOT,rfile,0); |
34 | </%code> | 35 | </%code> |
35 | <div class="source"> | 36 | <div class="source"> |
36 | <h1><% rfile %></h1> | 37 | <h1><% rfile %></h1> |
37 | <ul> | 38 | <ul> |