added: to Item struct: ameta (PT::Space)

admin meta information
added: option "a" to meta winix function
       editing admin meta information
changed: now if you don't have write access to an item
         you can't see the meta information
         previous if you had read access you could have seen them
added: in plugin ticket and thread
       support for 'closing' (ticket, thread)
       (this is only logic, we need some html yet)
added: some ezc function for getting meta/admin meta information
       (for the current item and the last directory)




git-svn-id: svn://ttmath.org/publicrep/winix/trunk@907 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2012-11-04 21:01:02 +00:00
parent 4809016b78
commit 0045c6c72c
24 changed files with 389 additions and 88 deletions

View File

@@ -311,7 +311,7 @@ Error Db::AddItemIntoItem(Item & item)
query.Clear();
query << R("insert into core.item (user_id, modification_user_id, group_id, privileges, "
"date_creation, date_modification, type, parent_id, content_id, "
"link_to, link_redirect, subject, guest_name, template, sort_index, meta, url) values (")
"link_to, link_redirect, subject, guest_name, template, sort_index, meta, ameta, url) values (")
<< item.user_id
<< item.modification_user_id
<< item.group_id
@@ -327,7 +327,8 @@ Error Db::AddItemIntoItem(Item & item)
<< item.guest_name
<< item.html_template
<< item.sort_index
<< item.meta;
<< item.meta
<< item.ameta;
url_without_id = AddItemCreateUrlSubject(item);
@@ -469,7 +470,7 @@ Error Db::EditItemInItem(Item & item, bool with_url)
query.Clear();
query << R("update core.item set (user_id, modification_user_id, group_id, privileges, "
"date_creation, date_modification, type, link_to, link_redirect, parent_id, subject, "
"guest_name, template, sort_index, meta");
"guest_name, template, sort_index, meta, ameta");
if( with_url )
query << R(", url");
@@ -489,7 +490,8 @@ Error Db::EditItemInItem(Item & item, bool with_url)
<< item.guest_name
<< item.html_template
<< item.sort_index
<< item.meta;
<< item.meta
<< item.ameta;
if( with_url )
{
@@ -771,7 +773,7 @@ void Db::GetItemsQuerySelect(const DbItemQuery & iq, DbTextStream & query, bool
if( iq.sel_file ) query << R(", file_path, file_fs, file_type, has_thumb, hash, hash_type, file_size");
if( iq.sel_html_template ) query << R(", template");
if( iq.sel_sort_index ) query << R(", sort_index");
if( iq.sel_meta ) query << R(", meta");
if( iq.sel_meta ) query << R(", meta, ameta");
}
query << R(" from core.item");
@@ -1343,6 +1345,19 @@ return DoCommand(query);
}
Error Db::EditAdminMetaById(const PT::Space & ameta, long id)
{
query.Clear();
query << R("update core.item set (ameta) = (")
<< ameta
<< R(") where id=")
<< id
<< R(";");
return DoCommand(query);
}
Error Db::EditSubjectById(Item & item, long id)