summaryrefslogtreecommitdiffabout
authorMichael Krelin <hacker@klever.net>2005-04-25 17:07:02 (UTC)
committer Michael Krelin <hacker@klever.net>2005-04-25 17:07:02 (UTC)
commit33efe232e5ed39c2dcb486fc1c381f09654c0126 (patch) (side-by-side diff)
tree967b0c795cc8c407234640ed196c18c259394f6a
parentdc836540970e798a91ae9460690e4462365e770a (diff)
downloadsitecing-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
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--configure.ac2
-rw-r--r--htdocs/handlers/exception_dev7
-rw-r--r--htdocs/sources.chtml5
-rw-r--r--htdocs/view.chtml9
4 files changed, 13 insertions, 10 deletions
diff --git a/configure.ac b/configure.ac
index e60f519..80f6321 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
-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])
AM_INIT_AUTOMAKE([dist-bzip2])
AC_PATH_PROG([XSLTPROC],[xsltproc],[true])
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
@@ -7,12 +7,13 @@
#include <cstdarg>
#include <stdexcept>
#include <cxxabi.h>
#include <sitecing/sitecing_util.h>
#include <sitecing/util.h>
#include <sitecing/magic.h>
+ #include <konforka/util.h>
#include <konforka/exception.h>
</%impl>
%%var string message;
%%var string root_source;
%%var string root_intermediate;
%%var string root_so;
@@ -251,23 +252,23 @@
}
error_line = strtol(ln.c_str(),0,10);
}
}
}
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();
}
}
if(!cumulative.empty())
cumulative += '\n';
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));
}
}
</%code>
</div>
</%method>
@@ -315,13 +316,13 @@
<div class="what">
<% sitecing::html_escape(message,sitecing::html_escape_br) %>
</div>
</div>
</%method>
<%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){ }
try{
return sitecing::strip_prefix(np,root_intermediate);
}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
@@ -1,12 +1,13 @@
% /* vim:set ft=sitecing: */
%%derive layout = "/ancestry/layout.chtml";
%%derive sources = "/ancestry/sources.chtml";
%%pragma main=page
<%impl>
#include <sitecing/sitecing_util.h>
+ #include <konforka/util.h>
</%impl>
<%constructor>
b_strict = false;
PN_PREV("/quickref/metasyntax","syntax","meta syntax");
</%constructor>
<%codemethod string title() %>
@@ -28,15 +29,15 @@
<li class="file"><a href="/view/<% sf.dir %>/<% sf.name %>" title="<% sf.desc %>" target="insert"><% sf.name %></a></li>
% }
% }
</ul>
<%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
rfile = "/view/"+rfile;
</%code>
<div class="insert">
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());