Fixed a bug where session info was created unncessarily by the scheduler

This commit is contained in:
JT Smith 2003-02-27 02:38:33 +00:00
parent 12c12f7124
commit 126d36e4ae
3 changed files with 4 additions and 4 deletions

View file

@ -59,8 +59,8 @@ sub www_viewActiveSessions {
while (%data = $sth->hash) {
$row[$i] = '<tr class="tableData"><td>'.$data{username}.' ('.$data{userId}.')</td>';
$row[$i] .= '<td>'.$data{sessionId}.'</td>';
$row[$i] .= '<td>'.epochToHuman($data{expires},"%H:%n%p %M/%D/%y").'</td>';
$row[$i] .= '<td>'.epochToHuman($data{lastPageView},"%H:%n%p %M/%D/%y").'</td>';
$row[$i] .= '<td>'.epochToHuman($data{expires}).'</td>';
$row[$i] .= '<td>'.epochToHuman($data{lastPageView}).'</td>';
$row[$i] .= '<td>'.$data{lastIP}.'</td>';
$row[$i] .= '<td align="center">'.deleteIcon("op=killSession&sid=$data{sessionId}").'</td></tr>';
$i++;

View file

@ -20,10 +20,9 @@ sub process {
my $epoch = time();
my $sth = WebGUI::SQL->read("select sessionId from userSession where expires<".$epoch);
while (my ($sessionId) = $sth->array) {
WebGUI::SQL->write("delete from userSessionScratch where sessionId=".quote($sessionId));
WebGUI::Session::end($sessionId);
}
$sth->finish;
WebGUI::SQL->write("delete from userSession where expires<".$epoch);
}
1;

View file

@ -58,6 +58,7 @@ if (opendir (CONFDIR,$confdir)) {
&$cmd();
}
}
WebGUI::Session::end($session{var}{sessionId});
WebGUI::Session::close();
}
}