Fixed a bug where session info was created unncessarily by the scheduler
This commit is contained in:
parent
12c12f7124
commit
126d36e4ae
3 changed files with 4 additions and 4 deletions
|
|
@ -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++;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ if (opendir (CONFDIR,$confdir)) {
|
|||
&$cmd();
|
||||
}
|
||||
}
|
||||
WebGUI::Session::end($session{var}{sessionId});
|
||||
WebGUI::Session::close();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue