added: to the Item: auth_path - a path to a static file (if auth is different from auth_none)
added: function 'mv' (move) git-svn-id: svn://ttmath.org/publicrep/winix/trunk@596 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
21
core/db.h
21
core/db.h
@@ -66,7 +66,7 @@ public:
|
||||
bool sel_url; // url
|
||||
bool sel_type; // type (dir, file, none)
|
||||
bool sel_default_item; // default_item
|
||||
bool sel_auth; // auth
|
||||
bool sel_auth; // auth, auth_path
|
||||
|
||||
bool where_id; //
|
||||
bool where_parent_id; //
|
||||
@@ -77,6 +77,7 @@ public:
|
||||
long parent_id; // if where_parent_id is true
|
||||
Item::Type type;
|
||||
Item::Auth auth;
|
||||
bool auth_equal; // if true means auth should be equal
|
||||
|
||||
bool sort_asc;
|
||||
|
||||
@@ -102,14 +103,17 @@ public:
|
||||
where_auth = where_;
|
||||
}
|
||||
|
||||
void WhereId(long id_) { where_id = true; id = id_; }
|
||||
void WhereParentId(long parent_id_) { where_parent_id = true; parent_id = parent_id_; }
|
||||
void WhereType(Item::Type type_) { where_type = true; type = type_; }
|
||||
void WhereAuth(Item::Auth st) { where_auth = true; auth = st; }
|
||||
void WhereId(long id_) { where_id = true; id = id_; }
|
||||
void WhereParentId(long parent_id_) { where_parent_id = true; parent_id = parent_id_; }
|
||||
void WhereType(Item::Type type_) { where_type = true; type = type_; }
|
||||
void WhereAuth(Item::Auth st,
|
||||
bool equal = true) { where_auth = true; auth = st; auth_equal = equal; }
|
||||
|
||||
ItemQuery()
|
||||
{
|
||||
sort_asc = true;
|
||||
sort_asc = true;
|
||||
auth_equal = true;
|
||||
|
||||
SetAll(true, false);
|
||||
|
||||
id = -1;
|
||||
@@ -131,7 +135,8 @@ public:
|
||||
|
||||
bool GetPriv(Item & item, long id);
|
||||
Error EditPrivById(Item & item, long id);
|
||||
|
||||
Error EditParentUrlById(Item & item, long id);
|
||||
Error EditAuthById(Item & item, long id);
|
||||
Error DelDirById(long id);
|
||||
|
||||
bool DelItem(const Item & item);
|
||||
@@ -215,7 +220,7 @@ protected:
|
||||
struct ItemColumns
|
||||
{
|
||||
int id, user_id, group_id, privileges, date_creation, date_modification, url, type, parent_id,
|
||||
content_id, default_item, subject, content, content_type, guest_name, auth;
|
||||
content_id, default_item, subject, content, content_type, guest_name, auth, auth_path;
|
||||
|
||||
void SetColumns(PGresult * r);
|
||||
void SetItem(PGresult * r, long row, Item & item);
|
||||
|
Reference in New Issue
Block a user