added: TextStream<> DbTextStream<> and HtmlTextStream<> have operator<<(Space&) now
added: to db: bool DbBase::AssertValueSpace(PGresult * r, int row, int col, Space & space, bool split_single) added: environment variables for users User::env (of type Space) and User::aenv (of type Space) for admin variables (can be changed only by a super user) added: winix function 'env' for changing User::env and User::aenv ('env' winix function with a 'a' parameter) git-svn-id: svn://ttmath.org/publicrep/winix/trunk@790 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2010-2011, Tomasz Sowa
|
||||
* Copyright (c) 2010-2012, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
@@ -143,7 +143,7 @@ return res;
|
||||
const std::wstring & DbBase::AssertValueWide(PGresult * r, int row, int col)
|
||||
{
|
||||
const char * res = AssertValue(r, row, col);
|
||||
static std::wstring temp_wide_value;
|
||||
static std::wstring temp_wide_value; // !! dac jako skladowa klasy (niestatyczna)
|
||||
|
||||
Ezc::UTF8ToWide(res, temp_wide_value);
|
||||
|
||||
@@ -210,6 +210,36 @@ tm DbBase::AssertValueTm(PGresult * r, int row, int col)
|
||||
}
|
||||
|
||||
|
||||
bool DbBase::AssertValueSpace(PGresult * r, int row, int col, Space & space, bool split_single)
|
||||
{
|
||||
const char * res = AssertValue(r, row, col);
|
||||
|
||||
conf_parser.UTF8(true);
|
||||
conf_parser.SplitSingle(split_single);
|
||||
conf_parser.SetSpace(space);
|
||||
space.Clear();
|
||||
|
||||
ConfParser::Status status = conf_parser.ParseString(res);
|
||||
|
||||
if( status != ConfParser::ok )
|
||||
{
|
||||
log << log1 << "Db: a problem with parsing a Space";
|
||||
|
||||
if( status == ConfParser::syntax_error )
|
||||
log << ", syntax error at line: " << conf_parser.line;
|
||||
|
||||
log << logend;
|
||||
|
||||
space.Clear();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void DbBase::ClearResult(PGresult * r)
|
||||
{
|
||||
|
Reference in New Issue
Block a user