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

@@ -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.
*
*/
@@ -23,66 +23,74 @@
struct Item
{
long id;
long parent_id;
long id;
long parent_id;
long user_id;
long group_id;
std::wstring guest_name; // used as a user name when user_id is equal -1
long user_id;
long group_id;
std::wstring guest_name; // used as a user name when user_id is equal -1
long modification_user_id; // who has modified the item last (not taken into account when checking permissions)
long modification_user_id; // who has modified the item last (not taken into account when checking permissions)
int privileges;
int privileges;
tm date_creation;
tm date_modification;
tm date_creation;
tm date_modification;
std::wstring subject;
std::wstring content;
std::wstring subject;
std::wstring content;
std::wstring url;
int modify_index;
std::wstring url;
int modify_index;
enum ContentType
{
ct_text = 0,
ct_formatted_text,
ct_html,
ct_bbcode,
ct_raw
};
enum ContentType
{
ct_text = 0,
ct_formatted_text,
ct_html,
ct_bbcode,
ct_raw
};
ContentType content_type;
ContentType content_type;
enum Type
{
dir = 0,
file = 1,
symlink = 2,
enum Type
{
dir = 0,
file = 1,
symlink = 2,
none = 1000
};
none = 1000
};
Type type;
Type type;
// used when type is symlink or to a directory too (function 'default')
std::wstring link_to;
int link_redirect;
// used when type is symlink or to a directory too (function 'default')
std::wstring link_to;
int link_redirect;
// static file (if exists)
std::wstring file_path; // relative file path
int file_fs; // file system type where the file was saved
int file_type; // file type (none, image, doc, etc)
bool has_thumb;
// static file (if exists)
std::wstring file_path; // relative file path
int file_fs; // file system type where the file was saved
int file_type; // file type (none, image, doc, etc)
bool has_thumb; // whether or not we have a thumbnail
std::wstring hash; // file hash (md4, md5, ...)
int hash_type; // hash type WINIX_CRYPT_HASH_* (see crypt.h)
size_t file_size; // size of the file
std::wstring html_template;
std::wstring html_template;
// sort index used when displaying a group of items
int sort_index;
// methods