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:
@@ -50,6 +50,8 @@ bool EditTicket::HasAccess()
|
||||
if( cur->mount->type != ticket_info->mount_type_ticket )
|
||||
return false;
|
||||
|
||||
// !! CHECKME what about closing threads?
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -187,19 +189,39 @@ void EditTicket::MakePost()
|
||||
}
|
||||
|
||||
|
||||
void EditTicket::CloseTicket()
|
||||
{
|
||||
PT::Space & ticket_space = cur->request->item.ameta.FindAddSpace(L"ticket");
|
||||
ticket_space.Add(L"closed", true);
|
||||
|
||||
PT::Space & thread_space = cur->request->item.ameta.FindAddSpace(L"thread");
|
||||
thread_space.Add(L"closed", true);
|
||||
|
||||
if( db->EditAdminMetaById(cur->request->item.ameta, cur->request->item.id) == WINIX_ERR_OK )
|
||||
log << log3 << "EditTicket: closing ticket" << logend;
|
||||
}
|
||||
|
||||
|
||||
void EditTicket::MakeGet()
|
||||
{
|
||||
ticket_info->Clear();
|
||||
ticket_info->FindCurrentConf();
|
||||
if( cur->request->IsParam(L"close") )
|
||||
{
|
||||
CloseTicket();
|
||||
system->RedirectToLastItem();
|
||||
}
|
||||
else
|
||||
{
|
||||
ticket_info->Clear();
|
||||
ticket_info->FindCurrentConf();
|
||||
|
||||
Ticket & ticket = PrepareTicket();
|
||||
PT::Space & meta = PrepareSpace();
|
||||
ticket_info->ticket = &ticket;
|
||||
ticket_info->item = &cur->request->item;
|
||||
Ticket & ticket = PrepareTicket();
|
||||
PT::Space & meta = PrepareSpace();
|
||||
ticket_info->ticket = &ticket;
|
||||
ticket_info->item = &cur->request->item;
|
||||
|
||||
// copy meta info to display correctly new files
|
||||
ticket_info->CopyTicketSpace(meta, cur->request->item);
|
||||
// copy meta info to display correctly new files
|
||||
ticket_info->CopyTicketSpace(meta, cur->request->item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user