forked from extern/egroupware
fixed preferences wrong comparison causing unchanged preferences were search for changes, and fixed IDE warnings
This commit is contained in:
parent
d46def6606
commit
e26cda55f8
@ -258,7 +258,7 @@ class preferences
|
|||||||
* replaces the english key's with translated ones, or if $un_lang the opposite
|
* replaces the english key's with translated ones, or if $un_lang the opposite
|
||||||
*
|
*
|
||||||
* @param string $msg message to translate
|
* @param string $msg message to translate
|
||||||
* @param array $values=array() extra vars to replace in addition to $this->values, vars are in an array with \
|
* @param array $vals =array() extra vars to replace in addition to $this->values, vars are in an array with \
|
||||||
* $key => $value pairs, $key does not include the $'s and is the *untranslated* name
|
* $key => $value pairs, $key does not include the $'s and is the *untranslated* name
|
||||||
* @param boolean $un_lang =false if true translate back
|
* @param boolean $un_lang =false if true translate back
|
||||||
* @return string
|
* @return string
|
||||||
@ -583,7 +583,7 @@ class preferences
|
|||||||
* @param string $app_name name of the app
|
* @param string $app_name name of the app
|
||||||
* @param string $var name of preference to be stored
|
* @param string $var name of preference to be stored
|
||||||
* @param mixed $value ='##undef##' value of the preference, if not given $GLOBALS[$var] is used
|
* @param mixed $value ='##undef##' value of the preference, if not given $GLOBALS[$var] is used
|
||||||
* @param $type='user' of preference to set: forced, default, user
|
* @param string $type ='user' of preference to set: forced, default, user
|
||||||
* @return array with new effective prefs (even when forced or default prefs are set !)
|
* @return array with new effective prefs (even when forced or default prefs are set !)
|
||||||
*/
|
*/
|
||||||
function add($app_name,$var,$value = '##undef##',$type='user')
|
function add($app_name,$var,$value = '##undef##',$type='user')
|
||||||
@ -880,7 +880,7 @@ class preferences
|
|||||||
//echo "<p>preferences::save_repository(,$type): account_id=$account_id, prefs="; print_r($prefs); echo "</p>\n";
|
//echo "<p>preferences::save_repository(,$type): account_id=$account_id, prefs="; print_r($prefs); echo "</p>\n";
|
||||||
|
|
||||||
if (isset($GLOBALS['egw_setup']) || !$GLOBALS['egw']->acl->check('session_only_preferences',1,'preferences') &&
|
if (isset($GLOBALS['egw_setup']) || !$GLOBALS['egw']->acl->check('session_only_preferences',1,'preferences') &&
|
||||||
(!($old_prefs = $this->cache_read($account_id)) || $old_prefs[$account_id] != $prefs))
|
(!($old_prefs = $this->cache_read($account_id)) || $old_prefs != $prefs))
|
||||||
{
|
{
|
||||||
//error_log(__METHOD__."(type=$type) saved, because old_prefs[$account_id] != prefs=".array2string($prefs));
|
//error_log(__METHOD__."(type=$type) saved, because old_prefs[$account_id] != prefs=".array2string($prefs));
|
||||||
$changed = 0;
|
$changed = 0;
|
||||||
@ -938,7 +938,7 @@ class preferences
|
|||||||
* In the absence of a custom ['email']['address'], this function should be used to set it.
|
* In the absence of a custom ['email']['address'], this function should be used to set it.
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @param int $accountid - as determined in and/or passed to "create_email_preferences"
|
* @param int $account_id as determined in and/or passed to "create_email_preferences"
|
||||||
* @return string with email-address
|
* @return string with email-address
|
||||||
*/
|
*/
|
||||||
function email_address($account_id='')
|
function email_address($account_id='')
|
||||||
|
Loading…
Reference in New Issue
Block a user