WIP: remove the old database abstraction layer

remove such classes:
- DbBase
- DbConn
- DbTextStream
- Db

while here:
- remove: TextStream, SLog, TexTextStream
This commit is contained in:
2024-06-22 18:03:54 +02:00
parent 5d457f3d4b
commit 6aa100f12c
138 changed files with 6658 additions and 12402 deletions

View File

@@ -5,7 +5,7 @@
*/
/*
* Copyright (c) 2012-2021, Tomasz Sowa
* Copyright (c) 2012-2024, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -34,6 +34,7 @@
#include "env.h"
#include "core/log.h"
#include "core/misc.h"
namespace Winix
@@ -73,7 +74,7 @@ bool Env::Parse(const std::wstring & env_str)
}
bool Env::EditAdminEnv(const std::wstring & env_str, bool use_ses_log)
bool Env::EditAdminEnv(const std::wstring & env_str)
{
if( Parse(env_str) )
{
@@ -93,15 +94,15 @@ bool Env::EditAdminEnv(const std::wstring & env_str, bool use_ses_log)
{
log << log2 << "Env: Syntax error in line: " << conf_parser.get_last_parsed_line() << logend;
if( use_ses_log )
slog << logerror << T("syntax_error_in_line") << ' ' << conf_parser.get_last_parsed_line() << logend;
// if( use_ses_log )
// slog << logerror << T("syntax_error_in_line") << ' ' << conf_parser.get_last_parsed_line() << logend;
}
return false;
}
bool Env::EditEnv(const std::wstring & env_str, bool use_ses_log)
bool Env::EditEnv(const std::wstring & env_str)
{
if( Parse(env_str) )
{
@@ -121,8 +122,8 @@ bool Env::EditEnv(const std::wstring & env_str, bool use_ses_log)
{
log << log2 << "Env: Syntax error in line: " << conf_parser.get_last_parsed_line() << logend;
if( use_ses_log )
slog << logerror << T("syntax_error_in_line") << ' ' << conf_parser.get_last_parsed_line() << logend;
// if( use_ses_log )
// slog << logerror << T("syntax_error_in_line") << ' ' << conf_parser.get_last_parsed_line() << logend;
}
return false;
@@ -139,21 +140,21 @@ void Env::SaveEnv()
{
if( cur->session->puser->is_super_user )
{
status = EditAdminEnv(env_str, true);
status = EditAdminEnv(env_str);
if( status )
{
slog << loginfo << T(L"env_admin_changed_successfully") << logend;
//slog << loginfo << T(L"env_admin_changed_successfully") << logend;
}
}
}
else
{
status = EditEnv(env_str, true);
status = EditEnv(env_str);
if( status )
{
slog << loginfo << T(L"env_changed_successfully") << logend;
//slog << loginfo << T(L"env_changed_successfully") << logend;
}
}
}