Commit e73ad7d8 authored by tbrehm's avatar tbrehm
Browse files

Fixed a bug in javascript library related to session handling.

parent 22c1e9da
......@@ -42,6 +42,7 @@ class session {
}
function close () {
if (!empty($this->fieldarray)) {
$result = $this->gc(ini_get('session.gc_maxlifetime'));
return $result;
......@@ -55,7 +56,7 @@ class session {
if (is_array($rec)) {
$this->session_array = $rec;
return $this->session_array['session_data'];
return $rec['session_data'];
} else {
return '';
}
......@@ -67,6 +68,7 @@ class session {
$this->session_array = array();
}
if ($this->session_array['session_id'] == '') {
$session_id = $this->db->quote($session_id);
$date_created = date('Y-m-d H:i:s');
......@@ -74,12 +76,14 @@ class session {
$session_data = $this->db->quote($session_data);
$sql = "INSERT INTO sys_session (session_id,date_created,last_updated,session_data) VALUES ('$session_id','$date_created','$last_updated','$session_data')";
$this->db->query($sql);
} else {
$session_id = $this->db->quote($session_id);
$last_updated = date('Y-m-d H:i:s');
$session_data = $this->db->quote($session_data);
$sql = "UPDATE sys_session SET last_updated = '$last_updated', session_data = '$session_data' WHERE session_id = '$session_id'";
$this->db->query($sql);
}
return true;
......@@ -111,6 +115,7 @@ class session {
@session_write_close();
}
}
?>
\ No newline at end of file
<?php
session_start();
include('../../lib/config.inc.php');
include_once(ISPC_ROOT_PATH.'/web/strengthmeter/lib/lang/'.$_SESSION['s']['language'].'_strengthmeter.lng');
$lang = (isset($_SESSION['s']['language']) && $_SESSION['s']['language'] != '')?$_SESSION['s']['language']:'en';
include_once(ISPC_ROOT_PATH.'/web/strengthmeter/lib/lang/'.$lang.'_strengthmeter.lng');
?>
redirect = '';
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment