removed: Done class (core/done.h, core/done.cpp)
removed: from Session: done, done_status, timers git-svn-id: svn://ttmath.org/publicrep/winix/trunk@594 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2008-2009, Tomasz Sowa
|
||||
* Copyright (c) 2008-2010, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
@@ -31,7 +31,7 @@ return true;
|
||||
|
||||
void Content::EditTicketCheckFirstItem()
|
||||
{
|
||||
if( request.session->done_status != WINIX_ERR_OK )
|
||||
if( request.status != WINIX_ERR_OK )
|
||||
return;
|
||||
|
||||
|
||||
@@ -47,9 +47,9 @@ void Content::EditTicketCheckFirstItem()
|
||||
SetUser(item);
|
||||
PrepareUrl(item);
|
||||
|
||||
request.session->done_status = db.AddItem(item);
|
||||
request.status = db.AddItem(item);
|
||||
|
||||
if( request.session->done_status == WINIX_ERR_OK )
|
||||
if( request.status == WINIX_ERR_OK )
|
||||
{
|
||||
log << log2 << "Content: added the first item with content for the ticket, item.id: " << item.id << logend;
|
||||
request.ticket.item_id = item.id;
|
||||
@@ -61,7 +61,7 @@ void Content::EditTicketCheckFirstItem()
|
||||
|
||||
void Content::EditTicketModTicket()
|
||||
{
|
||||
if( request.session->done_status != WINIX_ERR_OK )
|
||||
if( request.status != WINIX_ERR_OK )
|
||||
return;
|
||||
|
||||
Ticket ticket;
|
||||
@@ -74,14 +74,14 @@ void Content::EditTicketModTicket()
|
||||
request.ticket.expected = ticket.expected;
|
||||
request.ticket.progress = ticket.progress;
|
||||
|
||||
request.session->done_status = db.EditTicketById(request.ticket);
|
||||
request.status = db.EditTicketById(request.ticket);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void Content::EditTicketModDir()
|
||||
{
|
||||
if( request.session->done_status != WINIX_ERR_OK )
|
||||
if( request.status != WINIX_ERR_OK )
|
||||
return;
|
||||
|
||||
// we don't modify the url
|
||||
@@ -92,14 +92,14 @@ void Content::EditTicketModDir()
|
||||
if( edit_dir_subject )
|
||||
{
|
||||
dir.subject = request.item.subject;
|
||||
request.session->done_status = db.EditItemById(dir, false);
|
||||
request.status = db.EditItemById(dir, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Content::EditTicketModFirstItem()
|
||||
{
|
||||
if( request.session->done_status != WINIX_ERR_OK )
|
||||
if( request.status != WINIX_ERR_OK )
|
||||
return;
|
||||
|
||||
// modyfing the first item (the one with content)
|
||||
@@ -119,17 +119,15 @@ void Content::EditTicketModFirstItem()
|
||||
|
||||
void Content::PostFunEditTicketLogAndRedirect()
|
||||
{
|
||||
if( request.session->done_status == WINIX_ERR_OK )
|
||||
if( request.status == WINIX_ERR_OK )
|
||||
{
|
||||
request.session->done = Done::edited_ticket;
|
||||
|
||||
log << log2 << "Content: edited a ticket" << logend;
|
||||
RedirectToLastDir();
|
||||
}
|
||||
else
|
||||
{
|
||||
log << log1 << "Content: problem with editing a ticket, error code:"
|
||||
<< request.session->done_status << logend;
|
||||
log << log1 << "Content: problem with editing a ticket, error code: "
|
||||
<< request.status << logend;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -143,7 +141,7 @@ void Content::PostFunEditTicket()
|
||||
|
||||
ReadItem(request.item, Item::dir);
|
||||
|
||||
if( !FunCreateTicketCheckAbuse(Done::edited_ticket) )
|
||||
if( !FunCreateTicketCheckAbuse() )
|
||||
{
|
||||
ReadItemContentWithType(request.item); // for correctly displaying the form
|
||||
return;
|
||||
|
Reference in New Issue
Block a user