made appsession working again

This commit is contained in:
Lars Kneschke 2001-02-24 22:56:31 +00:00
parent 5fabf01a2b
commit ed50495e1a
2 changed files with 4 additions and 2 deletions

View File

@ -687,7 +687,7 @@
/* Wrapper to the session->appsession() */
function appsession($data = '##NOTHING##') {
global $phpgw_info, $phpgw;
return $phpgw->session->appsession($data);
return $phpgw->session->appsession('default','',$data);
}
function show_date($t = '', $format = '')

View File

@ -362,7 +362,7 @@
// I added these into seperate steps for easier debugging
$data = $phpgw->db->f('content');
$data = $phpgw->common->decrypt($data);
$data = $phpgw->crypto->decrypt($data);
$data = stripslashes($data);
return $data;
@ -376,12 +376,14 @@
// I added these into seperate steps for easier debugging
$data = serialize($data);
$data = $phpgw->crypto->encrypt($data);
$data = addslashes($data);
$phpgw->db->query("INSERT INTO phpgw_app_sessions (sessionid,loginid,app,location,content) "
. "VALUES ('".$this->sessionid."','".$this->account_id."','".$appname
. "','".$location."','".$data."')",__LINE__,__FILE__);
} else {
$data = $phpgw->crypto->encrypt(serialize($data));
$data = addslashes($data);
$phpgw->db->query("update phpgw_app_sessions set content = '".$data."'"
. "where sessionid = '".$this->sessionid."'"
. "and loginid = '".$this->account_id."' and app = '".$appname."'"