changed: in Request:

removed start_tm
         added start_date (PT::Date)
changed: in Session:
         removed: tm_time
         added: start_date (PT::Date)
         renamed: time -> start_time
         the same is for last_time
         now we have (last_time and last_date)



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@838 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2012-05-24 21:09:37 +00:00
parent db9d381a43
commit 5b845f1d03
11 changed files with 153 additions and 104 deletions

View File

@@ -15,7 +15,6 @@
Session::Session()
{
SetTimeToNow();
Clear();
plugin_data.SetSession(this);
}
@@ -45,20 +44,21 @@ return *this;
void Session::SetTimeToNow()
void Session::SetTimesTo(time_t time)
{
time = std::time(0);
tm_time = Time(time);
last_time = time;
tm_last_time = tm_time;
start_time = time;
start_date = time;
last_time = start_time;
last_date = start_date;
// the first request can be a POST (it doesn't matter)
last_time_get = time;
last_time_get = start_time;
}
// this doesn't clear times
// clear_plugin_data is used when clearing the temporary session
void Session::Clear(bool clear_plugin_data)
{
id = 0;
@@ -70,6 +70,16 @@ void Session::Clear(bool clear_plugin_data)
spam_score = 0;
remove_me = false;
start_time = 0;
last_time = 0;
last_time_get = 0;
start_date.Clear();
last_date.Clear();
tz_add = 0;
log_buffer.Clear();
last_css.clear();
if( clear_plugin_data )
plugin_data.Resize(0);
}