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:
51
core/app.cpp
51
core/app.cpp
@@ -196,7 +196,7 @@ return true;
|
||||
|
||||
void App::ProcessRequest()
|
||||
{
|
||||
request.Clear();
|
||||
request.Clear(); // !! dac na koniec
|
||||
request.Read();
|
||||
|
||||
// when BaseUrlRedirect() return true we didn't have to set everything in request.Read()
|
||||
@@ -212,13 +212,15 @@ void App::ProcessRequest()
|
||||
functions.Parse();
|
||||
|
||||
system.mounts.CalcCurMount();
|
||||
|
||||
ReadAdditionalInfo();
|
||||
|
||||
Make();
|
||||
}
|
||||
|
||||
request.SendAll(); // !! czemu request sam sie chce wyslac? wrzucic to tutaj do app
|
||||
notify.ItemChanged(request.notify_code);
|
||||
|
||||
if( request.function )
|
||||
request.function->Clear();
|
||||
}
|
||||
|
||||
|
||||
@@ -295,15 +297,15 @@ bool sent = false;
|
||||
|
||||
|
||||
if( request.is_item && request.item.auth == Item::auth_none &&
|
||||
request.item.content_type == Item::ct_raw && request.status == WINIX_ERR_OK && request.pfunction )
|
||||
request.item.content_type == Item::ct_raw && request.status == WINIX_ERR_OK && request.function )
|
||||
{
|
||||
if( request.pfunction->fun.url == "cat" )
|
||||
if( request.function->fun.url == "cat" )
|
||||
{
|
||||
request.page << request.item.content;
|
||||
sent = true;
|
||||
}
|
||||
else
|
||||
if( request.pfunction->fun.url == "run" )
|
||||
if( request.function->fun.url == "run" )
|
||||
{
|
||||
templates.GenerateRunRaw();
|
||||
sent = true;
|
||||
@@ -320,9 +322,9 @@ bool sent = false;
|
||||
|
||||
void App::Make()
|
||||
{
|
||||
if( request.dir_table.empty() )
|
||||
if( request.dir_tab.empty() )
|
||||
{
|
||||
log << log1 << "Content: there is no a root dir (dir_table is empty)" << logend;
|
||||
log << log1 << "Content: there is no a root dir (dir_tab is empty)" << logend;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -350,9 +352,9 @@ void App::Make()
|
||||
if( !request.redirect_to.empty() )
|
||||
return;
|
||||
|
||||
if( request.dir_table.empty() )
|
||||
if( request.dir_tab.empty() )
|
||||
{
|
||||
log << log1 << "App: there is no a root dir (dir_table is empty -- after calling a function)" << logend;
|
||||
log << log1 << "App: there is no a root dir (dir_tab is empty -- after calling a function)" << logend;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -360,7 +362,7 @@ void App::Make()
|
||||
MakePage();
|
||||
|
||||
// !! dodac parametr do konfiga wlaczajacy te informacje
|
||||
//request->PrintGetTable();
|
||||
//request->PrintGetTab();
|
||||
//request->PrintEnv();
|
||||
//request->PrintIn();
|
||||
}
|
||||
@@ -368,31 +370,4 @@ void App::Make()
|
||||
|
||||
|
||||
|
||||
// !! dac lepsza nazwe i czy napewno w app to ma byc?
|
||||
void App::ReadAdditionalInfo()
|
||||
{
|
||||
if( request.dir_table.empty() )
|
||||
return;
|
||||
|
||||
if( system.mounts.pmount->type == Mount::thread )
|
||||
{
|
||||
if( db.GetThreadByDirId(request.dir_table.back()->id, request.thread) == WINIX_ERR_OK )
|
||||
request.is_thread = true;
|
||||
}
|
||||
else
|
||||
if( system.mounts.pmount->type == Mount::ticket )
|
||||
{
|
||||
if( db.GetTicketByDirId(request.dir_table.back()->id, request.ticket) == WINIX_ERR_OK )
|
||||
{
|
||||
request.is_ticket = true;
|
||||
|
||||
if( !request.is_item && (!request.pfunction || request.pfunction->fun.url == "ticket") )
|
||||
{
|
||||
db.GetItemById(request.ticket.item_id, request.item);
|
||||
// don't set request->is_item here
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user