Add a checkSettings method to the UserSettings class to verify user settings integrity
Bug #787744 reported by
Keith Hughitt
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Helioviewer.org |
Fix Released
|
Low
|
Keith Hughitt |
Bug Description
Previously something like this existed, and it used a generic $.each loop to compare each of the expected properties (in default settings) with what it found, and overwrote those which failed the validation check.
Since the new user settings format is multidimensional, the straight-forward looping approach no longer works and as such the class simply compares revisions and resets the entire user settings if the revision is out of date.
One possible approach would be to simply hard-code checks for each settings: the user settings are not likely to change very frequently, and the simplicity of hard-coding the verification checks here is better than an alternative looping approach.
Changed in helioviewer.org: | |
status: | New → Fix Committed |
Changed in helioviewer.org: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Moving to 2.3.0 milestone due to time constraints.