[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] api class.phpgw.php, 1.1.1.1.2.21, 1.1.1.1.2.22 class
From: |
Dan Kuykendall <address@hidden> |
Subject: |
[Phpgroupware-cvs] api class.phpgw.php, 1.1.1.1.2.21, 1.1.1.1.2.22 class.prefs.php, 1.1.1.1.2.6, 1.1.1.1.2.7 |
Date: |
Mon, 03 Nov 2003 10:07:56 +0000 |
Update of /cvsroot/phpgroupware/api
In directory subversions:/tmp/cvs-serv29794/api
Modified Files:
Tag: proposal-branch
class.phpgw.php class.prefs.php
Log Message:
fixed login bug created by class caching
Index: class.prefs.php
===================================================================
RCS file: /cvsroot/phpgroupware/api/class.prefs.php,v
retrieving revision 1.1.1.1.2.6
retrieving revision 1.1.1.1.2.7
diff -C2 -d -r1.1.1.1.2.6 -r1.1.1.1.2.7
*** class.prefs.php 3 Nov 2003 09:19:59 -0000 1.1.1.1.2.6
--- class.prefs.php 3 Nov 2003 10:07:51 -0000 1.1.1.1.2.7
***************
*** 66,69 ****
--- 66,95 ----
$args['app'] = $tmp[0];
$args['name'] = $tmp[1];
+ if($GLOBALS['phpgw']->acl->check('api.prefs.save', 1))
+ {
+ return $this->save($args);
+ }
+ elseif($args['value'] == '##UNSET##')
+ {
+
unset($this->data[$args['account_id']][$args['name']]);
+ }
+ else
+ {
+
$this->data[$args['account_id']][$args['app'].'.'.$args['name']] =
$args['value'];
+ }
+ $GLOBALS['phpgw_data']['prefs'] = $this->merge_prefs();
+ return True;
+ }
+
+ function save()
+ {
+ $args = new safe_args();
+ $args->set('pref', '##REQUIRED##', 'string');
+ $args->set('value', '##UNSET##', 'any');
+ $args->set('account_id', $this->account_id, 'any');
+ $args = $args->get(func_get_args(),__LINE__,__FILE__);
+ $tmp = explode('.', $args['pref']);
+ $args['app'] = $tmp[0];
+ $args['name'] = $tmp[1];
if($args['value'] == '##UNSET##')
***************
*** 93,96 ****
--- 119,123 ----
}
}
+ $GLOBALS['phpgw_data']['prefs'] = $this->merge_prefs();
return True;
}
***************
*** 147,150 ****
--- 174,182 ----
}
+ function merge_prefs()
+ {
+ return array_merge($this->data['phpgw_default'],
$this->data[$this->account_id], $this->data['phpgw_forced']);
+ }
+
function fill_phpgw_data()
{
***************
*** 162,166 ****
}
$this->load(array('app'=>$args['app']));
! $GLOBALS['phpgw_data']['prefs'] =
array_merge($this->data['phpgw_default'], $this->data[$this->account_id],
$this->data['phpgw_forced']);
}
--- 194,198 ----
}
$this->load(array('app'=>$args['app']));
! $GLOBALS['phpgw_data']['prefs'] = $this->merge_prefs();
}
Index: class.phpgw.php
===================================================================
RCS file: /cvsroot/phpgroupware/api/class.phpgw.php,v
retrieving revision 1.1.1.1.2.21
retrieving revision 1.1.1.1.2.22
diff -C2 -d -r1.1.1.1.2.21 -r1.1.1.1.2.22
*** class.phpgw.php 3 Nov 2003 09:40:30 -0000 1.1.1.1.2.21
--- class.phpgw.php 3 Nov 2003 10:07:51 -0000 1.1.1.1.2.22
***************
*** 88,91 ****
--- 88,92 ----
unset($GLOBALS['phpgw_data']['api']['phpgw_pass']);
$this->check_op();
+
unset($GLOBALS['phpgw_session']['serialized_classes']);
$GLOBALS['phpgw']->interface->good_login();
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] api class.phpgw.php, 1.1.1.1.2.21, 1.1.1.1.2.22 class.prefs.php, 1.1.1.1.2.6, 1.1.1.1.2.7,
Dan Kuykendall <address@hidden> <=