added: mount params can have arguments (in parentheses) added: mount params: withheader, withinfo, restrictcreatethread, only_root_can_remove, can_use_emacs_on(level), can_use_mkdir_on(level), added: table Item has 'subject' column now removed: column 'subject' from table Content git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@505 e52654a7-88a9-db11-a3e9-0013d4bc506e
107 lines
1.1 KiB
C++
Executable File
107 lines
1.1 KiB
C++
Executable File
/*
|
|
* This file is a part of CMSLU -- Content Management System like Unix
|
|
* and is not publicly distributed
|
|
*
|
|
* Copyright (c) 2008-2009, Tomasz Sowa
|
|
* All rights reserved.
|
|
*
|
|
*/
|
|
|
|
#ifndef headerfilecmslucoreitem
|
|
#define headerfilecmslucoreitem
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
|
|
struct Item
|
|
{
|
|
long id;
|
|
|
|
|
|
long user_id;
|
|
long group_id;
|
|
int privileges;
|
|
|
|
tm date_creation;
|
|
tm date_modification;
|
|
|
|
std::string subject;
|
|
std::string content;
|
|
std::string url;
|
|
|
|
|
|
// 0 - simple txt
|
|
// 1 - formatted txt
|
|
// 2 - html
|
|
// 3 - bbcode
|
|
int content_type;
|
|
|
|
|
|
|
|
enum Type
|
|
{
|
|
dir = 0,
|
|
file = 1,
|
|
|
|
none = 1000
|
|
};
|
|
|
|
|
|
Type type;
|
|
|
|
//item_type;
|
|
|
|
long parent_id;
|
|
long default_item;
|
|
|
|
|
|
// used by the database
|
|
// !! moze da sie w ogole z tego zrezygnowac?
|
|
long content_id;
|
|
|
|
|
|
Item()
|
|
{
|
|
Clear();
|
|
}
|
|
|
|
|
|
|
|
void Clear()
|
|
{
|
|
id = -1;
|
|
|
|
user_id = -1;
|
|
group_id = -1;
|
|
privileges = 0;
|
|
|
|
subject.clear();
|
|
content.clear();
|
|
url.clear();
|
|
|
|
content_type = 0;
|
|
|
|
type = none;
|
|
parent_id = -1;
|
|
default_item = -1;
|
|
|
|
content_id = -1;
|
|
|
|
time_t t = std::time(0);
|
|
date_creation = *std::localtime( &t );
|
|
date_modification = date_creation;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|