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:
@@ -2,7 +2,7 @@
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2008-2010, Tomasz Sowa
|
||||
* Copyright (c) 2008-2011, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
@@ -16,6 +16,7 @@
|
||||
#include "error.h"
|
||||
#include "requesttypes.h"
|
||||
#include "config.h"
|
||||
#include "misc.h"
|
||||
|
||||
|
||||
// 2 MB
|
||||
@@ -53,6 +54,7 @@ private:
|
||||
PostFileTab * post_file_tab;
|
||||
|
||||
int last; // last read character
|
||||
int var_index; // used as a postfix to the same name (is auto increment)
|
||||
|
||||
bool line_end_dos;
|
||||
std::string boundary;
|
||||
@@ -67,6 +69,7 @@ private:
|
||||
PostFile post_file_temp;
|
||||
|
||||
void LogFirst(const std::string & to_log, size_t len);
|
||||
void ConvStr(const std::string & src, std::wstring & dst);
|
||||
|
||||
bool IsWhite(int c);
|
||||
void SkipWhite();
|
||||
@@ -94,7 +97,36 @@ private:
|
||||
|
||||
void ReadChar();
|
||||
|
||||
|
||||
template<class Container, class Value>
|
||||
bool InsertPostVar(Container & container, std::wstring & key, const Value & value);
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
template<class Container, class Value>
|
||||
bool PostMultiParser::InsertPostVar(Container & container, std::wstring & key, const Value & value)
|
||||
{
|
||||
bool added;
|
||||
std::pair<typename Container::iterator, bool> res;
|
||||
|
||||
res = container.insert( std::make_pair(key, value) );
|
||||
added = res.second;
|
||||
|
||||
if( !added )
|
||||
{
|
||||
key += L"_inc";
|
||||
key += Toa(var_index);
|
||||
res = container.insert( std::make_pair(key, value) );
|
||||
added = res.second;
|
||||
var_index += 1;
|
||||
}
|
||||
|
||||
return added;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user