New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
馃悰 config.theme.timezone must not be overwritten #7232
Merged
kirrg001
merged 1 commit into
TryGhost:master
from
aileen:7182-set-config-must-not-overwrite-timezone
Aug 22, 2016
Merged
馃悰 config.theme.timezone must not be overwritten #7232
kirrg001
merged 1 commit into
TryGhost:master
from
aileen:7182-set-config-must-not-overwrite-timezone
Aug 22, 2016
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aileen
force-pushed
the
7182-set-config-must-not-overwrite-timezone
branch
from
August 19, 2016 14:40
ada417e
to
5ddc490
Compare
Ready for review and merge 馃帀 |
// Special case for theme.timezone, which should be overridden not merged | ||
if (config && config.theme && config.theme.timezone) { | ||
this._config.theme.timezone = config.theme.timezone; | ||
} else if (this._config && this._config.theme) { |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
aileen
force-pushed
the
7182-set-config-must-not-overwrite-timezone
branch
3 times, most recently
from
August 22, 2016 14:16
10ace06
to
190fca1
Compare
closes TryGhost#7182 When calling `config.set()` in the settings api, we want to set the active timezone of the blog to make it available in our `settingsCache`. But because the `theme` object in the `set` prototype was already set to `Etc/UTC` as default, the `_.merge` function would always overwrite our `activeTimezone` with the default value. This PR changes the code in the way, that we always set 'Etc/UTC' for the timezone as default, _until_ we fetched our settings and therefore the `activeTimezone` setting, so we can overwrite it. This issue had not only influence on the date helper, but everywhere in our codebase, where we rely on reading the `timezone` from our config, instead of our settings. The `{{@blog.timezone}}` helper reflected that quiet well, as it would always show `Etc/UTC`
aileen
force-pushed
the
7182-set-config-must-not-overwrite-timezone
branch
from
August 22, 2016 15:36
190fca1
to
41c7057
Compare
mixonic
pushed a commit
to mixonic/Ghost
that referenced
this pull request
Oct 28, 2016
closes TryGhost#7182 When calling `config.set()` in the settings api, we want to set the active timezone of the blog to make it available in our `settingsCache`. But because the `theme` object in the `set` prototype was already set to `Etc/UTC` as default, the `_.merge` function would always overwrite our `activeTimezone` with the default value. This PR changes the code in the way, that we always set 'Etc/UTC' for the timezone as default, _until_ we fetched our settings and therefore the `activeTimezone` setting, so we can overwrite it. This issue had not only influence on the date helper, but everywhere in our codebase, where we rely on reading the `timezone` from our config, instead of our settings. The `{{@blog.timezone}}` helper reflected that quiet well, as it would always show `Etc/UTC`
geekhuyang
pushed a commit
to geekhuyang/Ghost
that referenced
this pull request
Nov 20, 2016
closes TryGhost#7182 When calling `config.set()` in the settings api, we want to set the active timezone of the blog to make it available in our `settingsCache`. But because the `theme` object in the `set` prototype was already set to `Etc/UTC` as default, the `_.merge` function would always overwrite our `activeTimezone` with the default value. This PR changes the code in the way, that we always set 'Etc/UTC' for the timezone as default, _until_ we fetched our settings and therefore the `activeTimezone` setting, so we can overwrite it. This issue had not only influence on the date helper, but everywhere in our codebase, where we rely on reading the `timezone` from our config, instead of our settings. The `{{@blog.timezone}}` helper reflected that quiet well, as it would always show `Etc/UTC`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
closes #7182
When calling
config.set()
in the settings api, we want to set the active timezone of the blog to make it available in oursettingsCache
. But because thetheme
object in theset
prototype was already set toEtc/UTC
as default, the_.merge
function would always overwrite ouractiveTimezone
with the default value.This PR changes the code in the way, that we always set 'Etc/UTC' for the timezone as default, until we fetched our settings and therefore the
activeTimezone
setting, so we can overwrite it.This issue had not only influence on the date helper, but everywhere in our codebase, where we rely on reading the
timezone
from our config, instead of our settings. The{{@blog.timezone}}
helper reflected that quiet well, as it would always showEtc/UTC