6.0.0-git
2019-03-20

[#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 (at) horde (dot) org
Requester janne.peltonen (at) helsinki (dot) fi
Created 2008-03-07 (4030 days ago)
Due
Updated 2008-03-10 (4027 days ago)
Assigned 2008-03-07 (4030 days ago)
Resolved 2008-03-10 (4027 days ago)
Milestone
Patch No

History
2008-03-10 19:01:18 Chuck Hagenbuch Comment #4
State ⇒ Resolved
Reply to this comment
Committed, thanks for testing.
2008-03-10 18:41:53 Chuck Hagenbuch Deleted Original Message
 
2008-03-10 08:15:10 janne (dot) peltonen (at) helsinki (dot) fi Comment #3 Reply to this comment
Seems to work for me. Thanks.
2008-03-07 21:04:24 Chuck Hagenbuch Comment #2
Assigned to Chuck Hagenbuch
State ⇒ Feedback
New Attachment: Prefs.diff.txt Download
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.
2008-03-07 11:11:54 janne (dot) peltonen (at) helsinki (dot) fi Comment #1
Type ⇒ Bug
State ⇒ Unconfirmed
Priority ⇒ 2. Medium
Summary ⇒ Prefs singleton method does not check scope
Queue ⇒ Horde Groupware Webmail Edition
New Attachment: prefs_singleton_fix.patch
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?

Saved Queries