Use "0" instead of "false" for default user options

This is best-practice, as far as I can see. It doesn't make a
difference in terms of what is stored in the database. false,
the number 0 and the string "0" will all be stored as "0" in the
database. More precisely: These values will not be stored because
they are all considered equal to the default value by
UserOptionsManager::isValueEqual().

It makes a difference in terms of what is send to the browser. The
keyword "false" is 5 bytes while "0" is only one.

Bug: T300371
Change-Id: Ia9eb03ebdc2155df1785fa5d40bceaab56268bf9
This commit is contained in:
thiemowmde 2023-06-12 09:56:19 +02:00
parent 2d4dde3e67
commit bbf3b67bad

View file

@ -195,6 +195,6 @@
} }
}, },
"DefaultUserOptions": { "DefaultUserOptions": {
"revisionslider-disable": false "revisionslider-disable": 0
} }
} }