forked from extern/egroupware
fix for pgsql not liking the " instead of \'
This commit is contained in:
parent
b9efe46355
commit
6694dca315
@ -308,7 +308,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
function appsession($data = "##NOTHING##", $location = "default", $appname = "")
|
||||
function appsession($data = '##NOTHING##', $location = 'default', $appname = '')
|
||||
{
|
||||
global $phpgw_info, $phpgw;
|
||||
|
||||
@ -316,38 +316,38 @@
|
||||
$appname = $phpgw_info['flags']['currentapp'];
|
||||
}
|
||||
|
||||
/* This allows the user to put "" as the value. */
|
||||
if ($data == "##NOTHING##") {
|
||||
/* This allows the user to put '' as the value. */
|
||||
if ($data == '##NOTHING##') {
|
||||
$query = 'select content from phpgw_app_sessions where'
|
||||
.' sessionid = "'.$this->sessionid.'" and loginid = "'.$this->account_id.'"'
|
||||
.' and app = "'.$appname.'" and location = "'.$location.'"';
|
||||
." sessionid = '".$this->sessionid."' and loginid = '".$this->account_id."'"
|
||||
." and app = '".$appname."' and location = '".$location."'";
|
||||
|
||||
$phpgw->db->query($query,__LINE__,__FILE__);
|
||||
|
||||
$phpgw->db->next_record();
|
||||
$data = $phpgw->db->f("content");
|
||||
$data = $phpgw->db->f('content');
|
||||
#$data = $phpgw->common->decrypt($data);
|
||||
return $data;
|
||||
} else {
|
||||
$phpgw->db->query('select content from phpgw_app_sessions where '
|
||||
. 'sessionid = "'.$this->sessionid.'" and loginid = "'.$this->account_id.'" '
|
||||
. 'and app = "'.$appname.'" and location = "'.$location.'"',__LINE__,__FILE__);
|
||||
. "sessionid = '".$this->sessionid."' and loginid = '".$this->account_id."' "
|
||||
. "and app = '".$appname."' and location = '".$location."'",__LINE__,__FILE__);
|
||||
|
||||
if ($phpgw->db->num_rows()==0) {
|
||||
# some how the next line is not working correctly! knecke
|
||||
# $data = addslashes($phpgw->crypto->encrypt(serialize($data)));
|
||||
$data = addslashes(serialize($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__);
|
||||
. "VALUES ('".$this->sessionid."','".$this->account_id."','".$appname
|
||||
. "','".$location."','".$data."')",__LINE__,__FILE__);
|
||||
} else {
|
||||
# some how the next line is not working correctly! knecke
|
||||
# $data = addslashes($phpgw->crypto->encrypt(serialize($data)));
|
||||
$data = addslashes(serialize($data));
|
||||
$phpgw->db->query('update phpgw_app_sessions set content = "'.$data.'" '
|
||||
. 'where sessionid = "'.$this->sessionid.'" '
|
||||
. 'and loginid = "'.$this->account_id.'" and app = "'.$appname.'" '
|
||||
. 'and location = "'.$location.'"',__LINE__,__FILE__);
|
||||
$phpgw->db->query("update phpgw_app_sessions set content = '".$data."' "
|
||||
. "where sessionid = '".$this->sessionid."' "
|
||||
. "and loginid = '".$this->account_id."' and app = '".$appname."' "
|
||||
. "and location = '".$location."'",__LINE__,__FILE__);
|
||||
}
|
||||
|
||||
return $data;
|
||||
@ -368,7 +368,7 @@
|
||||
{
|
||||
global $$key;
|
||||
$$key = $value;
|
||||
$this->variableNames[$key]="registered";
|
||||
$this->variableNames[$key]='registered';
|
||||
#print "restored: ".$key.", $value<br>";
|
||||
}
|
||||
}
|
||||
@ -461,14 +461,14 @@
|
||||
$phpgw_info['server']['usecookies']) {
|
||||
if ($extravars) { $url .= "?$extravars"; }
|
||||
} else {
|
||||
$url .= "?sessionid=" . $phpgw_info['user']['sessionid'];
|
||||
$url .= "&kp3=" . $kp3;
|
||||
$url .= "&domain=" . $phpgw_info['user']['domain'];
|
||||
$url .= '?sessionid=' . $phpgw_info['user']['sessionid'];
|
||||
$url .= '&kp3=' . $kp3;
|
||||
$url .= '&domain=' . $phpgw_info['user']['domain'];
|
||||
// This doesn't belong in the API.
|
||||
// Its up to the app to pass this value. (jengo)
|
||||
// Putting it into the app requires a massive number of updates in email app.
|
||||
// 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"; }
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user