added FunctionBase::Clear() which is called at the end of a request

master
Tomasz Sowa 2 years ago
parent f35840e7de
commit 801fc062ef

@ -36,7 +36,7 @@
#include "log.h"
#include "plugin.h"
#include "misc.h"
#include "functions/functionbase.h"
namespace Winix
@ -100,6 +100,9 @@ void Request::Clear()
RemovePostFileTmp(post_file_tab);
ClearOutputStreams();
if( function )
function->Clear();
post_tab.clear();
post_file_tab.clear();
cookie_tab.clear();
@ -131,7 +134,7 @@ void Request::Clear()
dir_tab.clear();
last_item = &item;
is_item = false;
function = 0;
function = nullptr;
param_tab.clear();
anchor.clear();

@ -149,6 +149,12 @@ void FunctionBase::MakeDelete()
}
void FunctionBase::Clear()
{
// do nothing by default
}
} // namespace Winix

@ -96,6 +96,7 @@ public:
virtual void MakePost();
virtual void MakeGet();
virtual void MakeDelete();
virtual void Clear();
//void SetConfig(Config * pconfig);
//void SetCur(Cur * pcur);

@ -98,14 +98,19 @@ void Ls::MakeGet()
{
prepare_files();
prepare_dirs();
cur->request->models.Add(L"items", item_tab);
cur->request->models.Add(L"child_dirs", dir_tab);
}
cur->request->models.Add(L"items", item_tab);
cur->request->models.Add(L"child_dirs", dir_tab);
}
void Ls::Clear()
{
item_tab.clear();
dir_tab.clear();
}

@ -51,7 +51,7 @@ public:
Ls();
void MakeGet();
void Clear();
private:

Loading…
Cancel
Save