formatting

This commit is contained in:
Miles Lott 2001-12-03 21:47:13 +00:00
parent f391862b8b
commit 5f7dbf2b08

View File

@ -688,8 +688,9 @@
$appname = $GLOBALS['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."'";
@ -705,17 +706,22 @@
// return stripslashes($data);
return $GLOBALS['phpgw']->crypto->decrypt($data);
} else {
}
else
{
$GLOBALS['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__);
$encrypteddata = $GLOBALS['phpgw']->crypto->encrypt($data);
if ($GLOBALS['phpgw']->db->num_rows()==0) {
if ($GLOBALS['phpgw']->db->num_rows()==0)
{
$GLOBALS['phpgw']->db->query("INSERT INTO phpgw_app_sessions (sessionid,loginid,app,location,content,session_dla) "
. "VALUES ('".$this->sessionid."','".$this->account_id."','".$appname
. "','".$location."','".$encrypteddata."','" . time() . "')",__LINE__,__FILE__);
} else {
}
else
{
$GLOBALS['phpgw']->db->query("update phpgw_app_sessions set content = '".$encrypteddata."'"
. "where sessionid = '".$this->sessionid."'"
. "and loginid = '".$this->account_id."' and app = '".$appname."'"
@ -727,7 +733,7 @@
function restore()
{
$sessionData = $this->appsession("sessiondata");
$sessionData = $this->appsession('sessiondata');
if (is_array($sessionData))
{
@ -737,7 +743,7 @@
global $$key;
$$key = $value;
$this->variableNames[$key] = 'registered';
#print "restored: ".$key.", $value<br>";
// echo 'restored: '.$key.', ' . $value . '<br>';
}
}
}
@ -756,7 +762,7 @@
$sessionData[$key] = $$key;
}
}
$this->appsession("sessiondata",'',$sessionData);
$this->appsession('sessiondata','',$sessionData);
}
}
@ -842,7 +848,10 @@
{
while(list($key,$value) = each($extravars))
{
if (!empty($new_extravars)) $new_extravars .= '&';
if (!empty($new_extravars))
{
$new_extravars .= '&';
}
$new_extravars .= "$key=$value";
}
// This needs to be explictly reset to a string variable type for PHP3