forked from extern/egroupware
Fixed a few bugs with tring to re-read session cache info, which is competly broken anyway. We might need to do away with the idea, it doesn't seem any faster
This commit is contained in:
parent
b837322370
commit
4b1282adcd
@ -144,25 +144,38 @@
|
|||||||
{
|
{
|
||||||
global $phpgw, $phpgw_info;
|
global $phpgw, $phpgw_info;
|
||||||
|
|
||||||
if (! $phpgw->acl->check("session_only_preferences",1,"preferences")) {
|
if (! $phpgw->acl->check('session_only_preferences',1,'preferences'))
|
||||||
$this->db->lock("phpgw_preferences");
|
{
|
||||||
$this->db->query("delete from phpgw_preferences where preference_owner='" . $this->account_id . "'",__LINE__,__FILE__);
|
$this->db->lock('phpgw_preferences');
|
||||||
|
$this->db->query("delete from phpgw_preferences where preference_owner='" . $this->account_id
|
||||||
|
. "'",__LINE__,__FILE__);
|
||||||
|
|
||||||
if ($PHP_VERSION < "4.0.0") {
|
if ($PHP_VERSION < "4.0.0")
|
||||||
$pref_info = addslashes(serialize($this->data));
|
{
|
||||||
} else {
|
$pref_info = addslashes(serialize($this->data));
|
||||||
$pref_info = serialize($this->data);
|
}
|
||||||
}
|
else
|
||||||
|
{
|
||||||
$this->db->query("insert into phpgw_preferences (preference_owner,preference_value) values ('"
|
$pref_info = serialize($this->data);
|
||||||
. $this->account_id . "','" . $pref_info . "')",__LINE__,__FILE__);
|
}
|
||||||
|
|
||||||
$this->db->unlock();
|
$this->db->query("insert into phpgw_preferences (preference_owner,preference_value) values ('"
|
||||||
|
. $this->account_id . "','" . $pref_info . "')",__LINE__,__FILE__);
|
||||||
|
|
||||||
|
$this->db->unlock();
|
||||||
}
|
}
|
||||||
if ($update_session_info) {
|
else
|
||||||
$phpgw_info["user"]["preferences"] = $this->data;
|
{
|
||||||
$phpgw->session->save_repositories();
|
$phpgw_info['user']['preferences'] = $this->data;
|
||||||
|
$phpgw->session->save_repositories();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* if ($phpgw_info['server']['cache_phpgw_info'])
|
||||||
|
{
|
||||||
|
$phpgw->session->session_flags = 'U';
|
||||||
|
$phpgw->session->update_session_flags();
|
||||||
|
} */
|
||||||
|
|
||||||
return $this->data;
|
return $this->data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user