summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrandomdan <randomdan@localhost>2011-12-01 18:44:44 +0000
committerrandomdan <randomdan@localhost>2011-12-01 18:44:44 +0000
commit11464bb7f9dc14e321e6ea557ef32423c4148398 (patch)
tree73c87bc53d41e1b228967a4d581c4e71d71d6aaa
parentAllow specifying default CGI output options in the config file (diff)
downloadproject2-11464bb7f9dc14e321e6ea557ef32423c4148398.tar.bz2
project2-11464bb7f9dc14e321e6ea557ef32423c4148398.tar.xz
project2-11464bb7f9dc14e321e6ea557ef32423c4148398.zip
Add some sensible defaults and actually use them
-rw-r--r--project2/cgi/cgiOutputOptions.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/project2/cgi/cgiOutputOptions.cpp b/project2/cgi/cgiOutputOptions.cpp
index abda276..eb07b25 100644
--- a/project2/cgi/cgiOutputOptions.cpp
+++ b/project2/cgi/cgiOutputOptions.cpp
@@ -8,12 +8,12 @@ bool OutputOptions::url;
bool OutputOptions::parameters;
OutputOptions::OutputOptions(const xmlpp::Element * p) :
- Core(p, "core", false, true),
- Session(p, "session", false, true),
- Timing(p, "timing", false, true),
- Environment(p, "environment", false, true),
- URL(p, "url", false, true),
- Parameters(p, "parameters", false, true)
+ Core(p, "core", false, core),
+ Session(p, "session", false, session),
+ Timing(p, "timing", false, timing),
+ Environment(p, "environment", false, environment),
+ URL(p, "url", false, url),
+ Parameters(p, "parameters", false, parameters)
{
}
@@ -21,12 +21,12 @@ OutputOptionsLoader::OutputOptionsLoader() :
opts("CGI default output options")
{
opts.add_options()
- ("cgi.output.core", po::value(&OutputOptions::core), "Core messages")
- ("cgi.output.session", po::value(&OutputOptions::core), "Session values")
- ("cgi.output.timing", po::value(&OutputOptions::core), "Timing")
- ("cgi.output.environment", po::value(&OutputOptions::core), "Environment")
- ("cgi.output.url", po::value(&OutputOptions::core), "URL breakdown")
- ("cgi.output.parameters", po::value(&OutputOptions::core), "Parameters")
+ ("cgi.output.core", po::value(&OutputOptions::core)->default_value(true), "Core messages")
+ ("cgi.output.session", po::value(&OutputOptions::core)->default_value(true), "Session values")
+ ("cgi.output.timing", po::value(&OutputOptions::core)->default_value(true), "Timing")
+ ("cgi.output.environment", po::value(&OutputOptions::core)->default_value(true), "Environment")
+ ("cgi.output.url", po::value(&OutputOptions::core)->default_value(true), "URL breakdown")
+ ("cgi.output.parameters", po::value(&OutputOptions::core)->default_value(true), "Parameters")
;
}