fix saving of group preferences

This commit is contained in:
Ralf Becker 2019-01-10 15:06:05 +01:00
parent dab4168c40
commit cba3e713b4
2 changed files with 5 additions and 2 deletions

View File

@ -87,7 +87,8 @@ class admin_cmd_edit_preferences extends admin_cmd
$prefs->add($this->app, $name, $value, in_array($this->pref, array('default', 'forced')) ? $this->pref : 'user'); $prefs->add($this->app, $name, $value, in_array($this->pref, array('default', 'forced')) ? $this->pref : 'user');
} }
} }
$prefs->save_repository(true, $this->pref); $prefs->save_repository(true, $this->pref == 'group' ? 'user' : $this->pref);
return lang('Preferences saved.'); return lang('Preferences saved.');
} }

View File

@ -334,7 +334,9 @@ class preferences_settings
{ {
if ($content['is_admin']) if ($content['is_admin'])
{ {
self::admin_cmd_run($content, $values, $GLOBALS['egw']->preferences->get_account_id(), $type, $appname); if (($account_id = $GLOBALS['egw']->preferences->get_account_id()) < 0 && $type == 'user') $type = 'group';
self::admin_cmd_run($content, $values, $account_id, $type, $appname);
} }
else else
{ {