[horde] only first initialization of preferences via hooks

Michael M Slusarz slusarz at horde.org
Wed Mar 5 21:02:53 UTC 2014


Quoting Steffen <skhorde at smail.inf.fh-bonn-rhein-sieg.de>:

> setValue() does not cause the pref to be marked as "dirty", because
> "init" is true. Therefore changes made are not committed to the storage
> backend.

Manually mark the preference as dirty via setDirty() after setting it.

i.e., in prefs_init hook:

$scope_ob->setValue($pref, $value);
$scope_ob->setDirty($pref, true);

'init' only prevents the value from being automatically saved via  
set().  It won't prevent an explicit setting of the dirty flag.

michael
-- 

___________________________________
Michael Slusarz [slusarz at horde.org]



More information about the horde mailing list