Config - defaults

- Implemented replacement Config::get* methods.
- Replaced all calls throughout the code, with the new methods which
  have no static values as defaults.
This commit is contained in:
Paul Beckingham
2010-01-15 20:55:06 -05:00
parent 0faf7fa8ee
commit cb821c2a25
16 changed files with 234 additions and 265 deletions

View File

@@ -881,10 +881,12 @@ void Table::sort (std::vector <int>& order)
else
{
Date dl ((std::string)*left, context.config.get("reportdateformat",
context.config.get("dateformat","m/d/Y")));
Date dr ((std::string)*right, context.config.get("reportdateformat",
context.config.get("dateformat","m/d/Y")));
std::string format = context.config.get ("reportdateformat");
if (format == "")
format = context.config.get ("dateformat");
Date dl ((std::string)*left, format);
Date dr ((std::string)*right, format);
if (dl > dr)
SWAP
}
@@ -901,10 +903,12 @@ void Table::sort (std::vector <int>& order)
else
{
Date dl ((std::string)*left, context.config.get("reportdateformat",
context.config.get("dateformat","m/d/Y")));
Date dr ((std::string)*right, context.config.get("reportdateformat",
context.config.get("dateformat","m/d/Y")));
std::string format = context.config.get ("reportdateformat");
if (format == "")
format = context.config.get ("dateformat");
Date dl ((std::string)*left, format);
Date dr ((std::string)*right, format);
if (dl < dr)
SWAP
}