| Summary | Hooked prefs won't get stored |
| Queue | Horde Framework Packages |
| Queue Version | FRAMEWORK_3 |
| Type | Bug |
| State | Resolved |
| Priority | 2. Medium |
| Owners | chuck (at) horde (dot) org |
| Requester | manuel (at) mausz (dot) at |
| Created | 06/02/2008 (6366 days ago) |
| Due | |
| Updated | 02/05/2009 (6118 days ago) |
| Assigned | 01/29/2009 (6125 days ago) |
| Resolved | 02/04/2009 (6119 days ago) |
| Github Issue Link | |
| Github Pull Request | |
| Milestone | |
| Patch | No |
http://cvs.horde.org/diff.php/framework/Prefs/Prefs.php?rt=horde&r1=1.197&r2=1.198&ty=u
if (!($this->_scopes[$scope][$name]['m'] & _PREF_LOCKED)) { ... }
State ⇒ Resolved
http://cvs.horde.org/diff.php/framework/Prefs/Prefs.php?rt=horde&r1=1.196&r2=1.197&ty=u
http://cvs.horde.org/diff.php/horde/docs/CHANGES?rt=horde&r1=1.1201&r2=1.1202&ty=u
Your fix add the dirty bit to locked preferences. But in fact it
should mark them if they are NOT locked. So please negate the if
condition.
State ⇒ Resolved
Assigned to Chuck Hagenbuch
and committed it - thanks.
http://cvs.horde.org/diff.php/framework/Prefs/Prefs.php?r1=1.192&r2=1.193&ty=u
http://cvs.horde.org/diff.php/horde/docs/CHANGES?r1=1.1100&r2=1.1101&ty=u
* NOTE 3: Any preference that is NOT LOCKED, that is set by a hook, WILL BE
* SAVED WITH THAT VALUE. This means several things:
* 1) Users will get the results of the hook set for them in their
* preferences.
* 2) By virtue of this, the next time they log in and load their
* preferences, the hook will NOT be called, because in their last session,
* we saved the results of the hook for them. However, if the preference is
* locked, the result of the hook will never be saved.
#2We're hooking a lot of preferences for initial setup. If they won'tbe stored any more, this will generate a bunch of unnecessary SQL
querys.
#3Why should unlocked prefs not get stored? (counter question)State ⇒ Feedback
Priority ⇒ 2. Medium
Type ⇒ Bug
Summary ⇒ Hooked prefs won't get stored
Queue ⇒ Horde Framework Packages
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
/ manuel
Patch:
--- ./lib/Horde/Prefs.php.orig 2008-06-02 22:49:59.000000000 +0200
+++ ./lib/Horde/Prefs.php 2008-06-02 22:57:34.000000000 +0200
@@ -766,6 +766,7 @@
$this->_scopes[$scope][$name]['m'] & _PREF_DEFAULT) {
$val = Horde::callHook('_prefs_hook_' . $name,
array($this->_user), 'horde', $name);
$this->_scopes[$scope][$name]['v'] =
$this->convertToDriver($val, NLS::getCharset());
+ $this->_scopes[$scope][$name]['m'] |= _PREF_DIRTY;
}
}
}