changed: winix 'upload' function is a file manager now

we're using an jquery upload plugin
added:   Item struct has new rows: hash, hash_type, file_size, sort_index
added:   css mount parameter
         you can specify css files there, and javascript wysiwyg editors
         (ckeditor, tinymce) can make use of it
changed: post parsers can parse post variables with the same name
         (a postfix is added in such a case)
added:   common_dir parameter to the config
         this is a path to common directory (directory with common static files)
         it is needed to the 'css' mount parameter
         


git-svn-id: svn://ttmath.org/publicrep/winix/trunk@746 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2011-06-24 20:53:21 +00:00
parent 1d6ff73aad
commit 06f42dd9cb
58 changed files with 2462 additions and 1685 deletions

View File

@@ -29,7 +29,7 @@ class PostParser : public HttpSimpleParser
std::wstring temp_name, temp_value;
bool input_as_utf8;
size_t log_value_size;
int var_index;
protected:
@@ -63,21 +63,36 @@ protected:
}
virtual void Parameter(std::string & name, std::string & value)
void ConvStr(const std::string & src, std::wstring & dst)
{
if( input_as_utf8 )
{
Ezc::UTF8ToWide(name, temp_name);
Ezc::UTF8ToWide(value, temp_value);
}
Ezc::UTF8ToWide(src, dst);
else
AssignString(src, dst);
}
virtual void Parameter(std::string & name, std::string & value)
{
bool added;
std::pair<PostTab::iterator, bool> res;
ConvStr(name, temp_name);
ConvStr(value, temp_value);
res = post_tab->insert( std::make_pair(temp_name, temp_value) );
added = res.second;
if( !added )
{
AssignString(name, temp_name);
AssignString(value, temp_value);
temp_name += L"_inc";
temp_name += Toa(var_index);
res = post_tab->insert( std::make_pair(temp_name, temp_value) );
added = res.second;
var_index += 1;
}
std::pair<PostTab::iterator, bool> res = post_tab->insert( std::make_pair(temp_name, temp_value) );
CreateLog(res.second);
CreateLog(added);
}
@@ -104,6 +119,7 @@ public:
{
in = in_;
post_tab = &post_tab_;
var_index = 1;
HttpSimpleParser::Parse();
}