set_config() writes to the database even if it's not necessary
Bug #1526073 reported by
Aaron Wells
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mahara |
Fix Released
|
Low
|
Aaron Wells |
Bug Description
Mahara's set_config() methods updates the database every single time you call it, even if you haven't actually changed the value of the field.
It would be more efficient if it did not do this. Especially since it already does a SELECT statement to check whether it needs to do an UPDATE or INSERT, it would be trivial to also make it check to see if the value in the database is the same as the value passed by the user, and skip that UPDATE if so.
Changed in mahara: | |
assignee: | nobody → Aaron Wells (u-aaronw) |
Changed in mahara: | |
milestone: | 16.04.0 → 16.10.0 |
Changed in mahara: | |
status: | In Progress → Fix Committed |
Changed in mahara: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Patch for "master" branch: https:/ /reviews. mahara. org/5850