mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 23:00:56 +01:00
reverted my changes at appsession()
This commit is contained in:
parent
6694dca315
commit
16856ebc2b
@ -296,19 +296,20 @@
|
|||||||
$this->hooks = $phpgw->hooks->read();
|
$this->hooks = $phpgw->hooks->read();
|
||||||
}
|
}
|
||||||
|
|
||||||
function save_repositories()
|
function save_repositories()
|
||||||
{
|
{
|
||||||
global $phpgw, $phpgw_info;
|
global $phpgw, $phpgw_info;
|
||||||
$phpgw_info_temp = $phpgw_info;
|
|
||||||
$phpgw_info_temp['user']['kp3'] = '';
|
$phpgw_info_temp = $phpgw_info;
|
||||||
$phpgw_info_temp['flags'] = array();
|
$phpgw_info_temp['user']['kp3'] = '';
|
||||||
|
$phpgw_info_temp['flags'] = array();
|
||||||
|
|
||||||
|
if ($phpgw_info['server']['cache_phpgw_info']) {
|
||||||
|
$this->appsession('phpgw_info_cache','phpgwapi',$phpgw_info_temp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($phpgw_info['server']['cache_phpgw_info']) {
|
function appsession($location = "default", $appname = "", $data = "##NOTHING##")
|
||||||
$this->appsession('phpgw_info_cache','phpgwapi',$phpgw_info_temp);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function appsession($data = '##NOTHING##', $location = 'default', $appname = '')
|
|
||||||
{
|
{
|
||||||
global $phpgw_info, $phpgw;
|
global $phpgw_info, $phpgw;
|
||||||
|
|
||||||
@ -316,38 +317,38 @@
|
|||||||
$appname = $phpgw_info['flags']['currentapp'];
|
$appname = $phpgw_info['flags']['currentapp'];
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This allows the user to put '' as the value. */
|
/* This allows the user to put "" as the value. */
|
||||||
if ($data == '##NOTHING##') {
|
if ($data == "##NOTHING##") {
|
||||||
$query = 'select content from phpgw_app_sessions where'
|
$query = 'select content from phpgw_app_sessions where'
|
||||||
." sessionid = '".$this->sessionid."' and loginid = '".$this->account_id."'"
|
.' sessionid = "'.$this->sessionid.'" and loginid = "'.$this->account_id.'"'
|
||||||
." and app = '".$appname."' and location = '".$location."'";
|
.' and app = "'.$appname.'" and location = "'.$location.'"';
|
||||||
|
|
||||||
$phpgw->db->query($query,__LINE__,__FILE__);
|
$phpgw->db->query($query,__LINE__,__FILE__);
|
||||||
|
|
||||||
$phpgw->db->next_record();
|
$phpgw->db->next_record();
|
||||||
$data = $phpgw->db->f('content');
|
$data = $phpgw->db->f("content");
|
||||||
#$data = $phpgw->common->decrypt($data);
|
#$data = $phpgw->common->decrypt($data);
|
||||||
return $data;
|
return $data;
|
||||||
} else {
|
} else {
|
||||||
$phpgw->db->query('select content from phpgw_app_sessions where '
|
$phpgw->db->query('select content from phpgw_app_sessions where '
|
||||||
. "sessionid = '".$this->sessionid."' and loginid = '".$this->account_id."' "
|
. 'sessionid = "'.$this->sessionid.'" and loginid = "'.$this->account_id.'" '
|
||||||
. "and app = '".$appname."' and location = '".$location."'",__LINE__,__FILE__);
|
. 'and app = "'.$appname.'" and location = "'.$location.'"',__LINE__,__FILE__);
|
||||||
|
|
||||||
if ($phpgw->db->num_rows()==0) {
|
if ($phpgw->db->num_rows()==0) {
|
||||||
# some how the next line is not working correctly! knecke
|
# some how the next line is not working correctly! knecke
|
||||||
# $data = addslashes($phpgw->crypto->encrypt(serialize($data)));
|
# $data = addslashes($phpgw->crypto->encrypt(serialize($data)));
|
||||||
$data = addslashes(serialize($data));
|
$data = addslashes(serialize($data));
|
||||||
$phpgw->db->query('INSERT INTO phpgw_app_sessions (sessionid,loginid,app,location,content) '
|
$phpgw->db->query('INSERT INTO phpgw_app_sessions (sessionid,loginid,app,location,content) '
|
||||||
. "VALUES ('".$this->sessionid."','".$this->account_id."','".$appname
|
. 'VALUES ("'.$this->sessionid.'","'.$this->account_id.'","'.$appname
|
||||||
. "','".$location."','".$data."')",__LINE__,__FILE__);
|
. '","'.$location.'","'.$data.'")',__LINE__,__FILE__);
|
||||||
} else {
|
} else {
|
||||||
# some how the next line is not working correctly! knecke
|
# some how the next line is not working correctly! knecke
|
||||||
# $data = addslashes($phpgw->crypto->encrypt(serialize($data)));
|
# $data = addslashes($phpgw->crypto->encrypt(serialize($data)));
|
||||||
$data = addslashes(serialize($data));
|
$data = addslashes(serialize($data));
|
||||||
$phpgw->db->query("update phpgw_app_sessions set content = '".$data."' "
|
$phpgw->db->query('update phpgw_app_sessions set content = "'.$data.'" '
|
||||||
. "where sessionid = '".$this->sessionid."' "
|
. 'where sessionid = "'.$this->sessionid.'" '
|
||||||
. "and loginid = '".$this->account_id."' and app = '".$appname."' "
|
. 'and loginid = "'.$this->account_id.'" and app = "'.$appname.'" '
|
||||||
. "and location = '".$location."'",__LINE__,__FILE__);
|
. 'and location = "'.$location.'"',__LINE__,__FILE__);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $data;
|
return $data;
|
||||||
@ -368,7 +369,7 @@
|
|||||||
{
|
{
|
||||||
global $$key;
|
global $$key;
|
||||||
$$key = $value;
|
$$key = $value;
|
||||||
$this->variableNames[$key]='registered';
|
$this->variableNames[$key]="registered";
|
||||||
#print "restored: ".$key.", $value<br>";
|
#print "restored: ".$key.", $value<br>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -461,14 +462,14 @@
|
|||||||
$phpgw_info['server']['usecookies']) {
|
$phpgw_info['server']['usecookies']) {
|
||||||
if ($extravars) { $url .= "?$extravars"; }
|
if ($extravars) { $url .= "?$extravars"; }
|
||||||
} else {
|
} else {
|
||||||
$url .= '?sessionid=' . $phpgw_info['user']['sessionid'];
|
$url .= "?sessionid=" . $phpgw_info['user']['sessionid'];
|
||||||
$url .= '&kp3=' . $kp3;
|
$url .= "&kp3=" . $kp3;
|
||||||
$url .= '&domain=' . $phpgw_info['user']['domain'];
|
$url .= "&domain=" . $phpgw_info['user']['domain'];
|
||||||
// This doesn't belong in the API.
|
// This doesn't belong in the API.
|
||||||
// Its up to the app to pass this value. (jengo)
|
// Its up to the app to pass this value. (jengo)
|
||||||
// Putting it into the app requires a massive number of updates in email app.
|
// Putting it into the app requires a massive number of updates in email app.
|
||||||
// Until that happens this needs to stay here (seek3r)
|
// Until that happens this needs to stay here (seek3r)
|
||||||
if ($phpgw_info['flags']['newsmode']) { $url .= '&newsmode=on'; }
|
if ($phpgw_info['flags']['newsmode']) { $url .= "&newsmode=on"; }
|
||||||
if ($extravars) { $url .= "&$extravars"; }
|
if ($extravars) { $url .= "&$extravars"; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user