removed some thread and ticket information from request

they are in FunThread and FunTicket classes now
added funtion FunUptime (I forgot about it)



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@631 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2010-08-10 20:43:38 +00:00
parent 76897b8a83
commit 9901c63ede
79 changed files with 1219 additions and 993 deletions

View File

@@ -21,16 +21,21 @@ CreateTicket::CreateTicket()
}
void CreateTicket::Clear()
{
functions->fun_ticket.Clear();
}
// returning true if we can create a ticket in the current directory
bool CreateTicket::HasAccess()
{
if( request->dir_table.empty() )
if( request->dir_tab.empty() )
return false;
if( request->is_item )
return false;
if( !system->HasWriteAccess(*request->dir_table.back()) )
if( !system->HasWriteAccess(*request->dir_tab.back()) )
return false;
if( !system->mounts.pmount || system->mounts.pmount->type != Mount::ticket )
@@ -46,7 +51,7 @@ bool CreateTicket::HasAccess()
if( !system->mounts.pmount->IsPar(Mount::par_createticket_on) )
return true;
if( system->mounts.pmount->IsArg(Mount::par_createticket_on, request->dir_table.size()) )
if( system->mounts.pmount->IsArg(Mount::par_createticket_on, request->dir_tab.size()) )
return true;
return false;
@@ -81,10 +86,10 @@ void CreateTicket::AddTicket()
{
static std::string temp;
request->ticket.dir_id = request->dir_table.back()->id; // a new directory created by Mkdir()
request->ticket.item_id = request->item.id; // this id is set by PostFunEmacsAdd()
functions->fun_ticket.ticket.dir_id = request->dir_tab.back()->id; // a new directory created by Mkdir()
functions->fun_ticket.ticket.item_id = request->item.id; // this id is set by PostFunEmacsAdd()
request->status = db->AddTicket(request->ticket);
request->status = db->AddTicket(functions->fun_ticket.ticket);
}
@@ -110,7 +115,7 @@ void CreateTicket::MakePost()
functions->SetUser(request->item);
ReadTicket read_ticket;
read_ticket.Read(system, request, &request->ticket);
read_ticket.Read(system, request, &functions->fun_ticket.ticket);
request->item.privileges = 0777; // !! tymczasowo 777 aby wszyscy mogli wysylac posty
@@ -127,7 +132,7 @@ void CreateTicket::MakePost()
functions->ReadItemContentWithType(request->item);
request->item.type = Item::file;
request->item.privileges = 0644; // !! tymczasowo
request->item.parent_id = request->dir_table.back()->id;
request->item.parent_id = request->dir_tab.back()->id;
request->status = system->AddFile(request->item);