[#6395] Prefs singleton method does not check scope
Summary Prefs singleton method does not check scope
Queue Horde Groupware Webmail Edition
Queue Version 1.1-RC2
Type Bug
State Resolved
Priority 2. Medium
Owners Chuck Hagenbuch <chuck (at) horde (dot) org>
Requester janne (dot) peltonen (at) helsinki (dot) fi
Created 03/07/2008 (184 days ago)
Due
Updated 03/10/2008 (181 days ago)
Assigned 03/07/2008 (184 days ago)
Resolved 03/10/2008 (181 days ago)
Attachments Prefs.diff.txt Download
Milestone
Patch No

History
03/10/2008 Chuck Hagenbuch Comment #4
State ⇒ Resolved
Reply to this comment
Committed, thanks for testing.
03/10/2008 Chuck Hagenbuch Deleted Attachment: prefs_singleton_fix.patch
 
03/10/2008 janne (dot) peltonen (at) helsinki (dot) fi Comment #3 Reply to this comment
Seems to work for me. Thanks.
03/07/2008 Chuck Hagenbuch Comment #2
New Attachment: Prefs.diff.txt Download
State ⇒ Feedback
Assigned to Chuck Hagenbuch
Reply to this comment
Can you try the attached patch instead? We can cache objects with 
different scopes (and we want to, really, to avoid re-doing work), we 
just need to reset the scope.
03/07/2008 janne (dot) peltonen (at) helsinki (dot) fi Comment #1
New Attachment: prefs_singleton_fix.patch
Queue ⇒ Horde Groupware Webmail Edition
Summary ⇒ Prefs singleton method does not check scope
Type ⇒ Bug
Priority ⇒ 2. Medium
State ⇒ Unconfirmed
Reply to this comment
Apparently the Prefs class singleton method does not include the scope 
of the Prefs instance into the signature of the instance. This causes 
trouble at least with ingo/scripts/convert_imp_filters.php which first 
causes a Prefs object of scope 'imp' to be created (in order to load 
the 'filters' preference) and then, while wanting to save the 
converted filters in scope 'ingo' fails - because ingo_storage tries 
to get the singleton Prefs object and gets the one of type 'imp' - 
which has no 'rules' nor 'blacklist' etc. preferences. Attached patch 
adds scope to the signature of the singleton Prefs object - 
convert_imp_filters.php works after this, but does something else break?