added support for UTF-8

now the UTF-8 is a default charset


git-svn-id: svn://ttmath.org/publicrep/winix/trunk@677 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2010-11-21 00:19:17 +00:00
parent f1f0fa34cb
commit 8e72a820dd
153 changed files with 4270 additions and 2784 deletions

View File

@@ -17,7 +17,7 @@ namespace Fun
Mv::Mv()
{
fun.url = "mv";
fun.url = L"mv";
}
@@ -43,7 +43,7 @@ Item * last_but_one = 0;
{
// used in POST when the moving is performed
if( request->IsPostVar("onlycontent") )
if( request->IsPostVar(L"onlycontent") )
return system->HasWriteAccess(*last);
else
if( last_but_one )
@@ -131,9 +131,9 @@ return true;
bool Mv::MoveParseDir(long & dir_id, std::string & dir, std::string & file)
bool Mv::MoveParseDir(long & dir_id, std::wstring & dir, std::wstring & file)
{
int res = system->dirs.AnalyzePath(request->PostVar("to"), dir_id, dir, file);
int res = system->dirs.AnalyzePath(request->PostVar(L"to"), dir_id, dir, file);
if( res == 1 )
request->status = WINIX_ERR_NO_ROOT_DIR;
@@ -154,9 +154,9 @@ void Mv::MoveAuth(Item & item)
return;
}
if( rename(item.auth_path.c_str(), mv_new_path.c_str()) == 0 )
if( RenameFile(item.auth_path, mv_new_path) )
{
log << log1 << "Content: moved static file from: " << item.auth_path << ", to: " << mv_new_path << logend;
log << log1 << "Mv: moved static file from: " << item.auth_path << ", to: " << mv_new_path << logend;
item.auth_path = mv_new_path;
request->status = db->EditAuthById(item, item.id);
}
@@ -164,7 +164,7 @@ void Mv::MoveAuth(Item & item)
{
int err = errno;
log << log1 << "Content: can't move a file from: " << item.auth_path << ", to: " << mv_new_path << ", ";
log << log1 << "Mv: can't move a file from: " << item.auth_path << ", to: " << mv_new_path << ", ";
log.SystemErr(err);
log << logend;
@@ -208,7 +208,7 @@ void Mv::MoveFile(Item & item, bool redirect)
if( request->status == WINIX_ERR_OK )
{
log << log2 << "Content: the file was moved to: " << mv_dir << item.url << logend;
log << log2 << "Mv: the file was moved to: " << mv_dir << item.url << logend;
if( item.auth != Item::auth_none )
MoveAuth(item);
@@ -288,7 +288,7 @@ void Mv::MoveDir(Item & item, bool redirect)
if( mv_dir_id == item.id || system->dirs.HasParent(mv_dir_id, item.id) )
{
log << log1 << "Content: cannot move directory to inside it" << logend;
log << log1 << "Mv: cannot move directory to inside it" << logend;
request->status = WINIX_ERR_INCORRECT_DIR;
return;
}
@@ -311,7 +311,7 @@ void Mv::MoveDir(Item & item, bool redirect)
if( request->status == WINIX_ERR_OK )
{
log << log2 << "Content: the directory was moved to: " << mv_dir << item.url << logend;
log << log2 << "Mv: the directory was moved to: " << mv_dir << item.url << logend;
MoveAuthContentOfDir(item);
if( redirect )
@@ -337,7 +337,7 @@ void Mv::MakePost()
{
MoveAuthPrepareQuery();
if( request->IsPostVar("onlycontent") )
if( request->IsPostVar(L"onlycontent") )
{
if( mv_file.empty() )
MoveContentOfDir();