Conversation
98a7d7a to
09119f3
Compare
| if ($value !== null && array_key_exists($name, $this->attrs)) { | ||
| $settings[$name] = $value = $this->attrs[$name]['validate']($value); | ||
| } | ||
| if ($name === 'notesPath' && $value !== null) { |
There was a problem hiding this comment.
Do we need to limit this to the notesPath or could we just skip getting the default if the value is not null?
There was a problem hiding this comment.
The only reason we compute $default anyway is to compare that with the current $value and skip having write redundantly if they're the same. So yes, we can just skip the comparison $value === $default and always write the setting value whenever it's not null. I assume calling config->setUserValue() is cheap
Signed-off-by: Enjeck C. <patrathewhiz@gmail.com>
Signed-off-by: Enjeck C. <patrathewhiz@gmail.com>
Signed-off-by: Enjeck C. <patrathewhiz@gmail.com>
0ccffc9 to
05c493e
Compare
|
Hi and thanks for all the work going on to fix stuff - I am currently on stable 31.0.5 - is there now an ETA for the combined issues to have a fix implemented? (my own issue is the "Failed to get notes folder for user..." log entry thing.) |
@nigelharpur This has been fixed too. Will be available in next release #1556 |
getOrCreateNotesFolderwhich can be expensive, we just use the value in the cachesettingsService->get($userId, 'notesPath')since we assume the result is the samegetDefaultNotesPath()is called, the value is saved in the user settings such that we need not call it again since the function does file operations