added: parameter 'l' to 'ls' function
added: Db::ItemQuery struct for querying items changed: some refactoring (renamed some config variables) git-svn-id: svn://ttmath.org/publicrep/winix/trunk@589 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
33
core/item.h
33
core/item.h
@@ -18,20 +18,21 @@
|
||||
struct Item
|
||||
{
|
||||
long id;
|
||||
long parent_id;
|
||||
|
||||
|
||||
long user_id;
|
||||
long group_id;
|
||||
int privileges;
|
||||
std::string guest_name; // used as a user name when user_id is equal -1
|
||||
|
||||
// used as a user name when user_id is equal -1
|
||||
std::string guest_name;
|
||||
int privileges;
|
||||
|
||||
tm date_creation;
|
||||
tm date_modification;
|
||||
|
||||
std::string subject;
|
||||
std::string content;
|
||||
long content_id; // used by the database
|
||||
std::string url;
|
||||
|
||||
enum ContentType
|
||||
@@ -52,36 +53,34 @@ enum Type
|
||||
dir = 0,
|
||||
file = 1,
|
||||
|
||||
none = 1000
|
||||
none = 1000 // !! pozbyc sie tego
|
||||
};
|
||||
|
||||
|
||||
Type type;
|
||||
|
||||
//item_type;
|
||||
|
||||
long parent_id;
|
||||
long default_item;
|
||||
|
||||
|
||||
// used by the database
|
||||
long content_id;
|
||||
|
||||
|
||||
// external static file (saved in file system)
|
||||
// the direct url is the same but the prefix is: base_url_static_auth
|
||||
enum StaticAuth
|
||||
// external static file authorized by winix
|
||||
enum Auth
|
||||
{
|
||||
static_none = 0,
|
||||
static_image = 1, /* png, gif, jpg - only types available to render by a web browser*/
|
||||
static_document = 2, /* pdf doc xls txt */
|
||||
static_other = 3
|
||||
auth_none = 0, /* there is not an external file */
|
||||
auth_image = 1, /* png, gif, jpg - only types available to render by a web browser*/
|
||||
auth_document = 2, /* pdf doc xls txt */
|
||||
auth_other = 3 /* other file */
|
||||
};
|
||||
|
||||
|
||||
StaticAuth static_auth;
|
||||
Auth auth;
|
||||
|
||||
|
||||
|
||||
// methods
|
||||
|
||||
Item()
|
||||
{
|
||||
Clear();
|
||||
@@ -125,7 +124,7 @@ void Clear()
|
||||
|
||||
content_id = -1;
|
||||
|
||||
static_auth = static_none;
|
||||
auth = auth_none;
|
||||
|
||||
SetDateToNow();
|
||||
}
|
||||
|
Reference in New Issue
Block a user