mirror of
https://github.com/discourse/discourse.git
synced 2026-08-07 13:19:19 +08:00
DesignWizard::Apply set site settings itself via set_and_log, then hand-rolled an after_rollback callback to put the in-process SiteSetting cache back if a later write blew up. That compensation only ever fired if a third-party :site_setting_changed subscriber raised — already an unhandled 500 — and half of it was dead code, since after_rollback runs once the site_settings rows have already been reverted. It also forced transaction(requires_new: true), which meant a savepoint whose only purpose was to make the callback fire under transactional fixtures. Delegate to SiteSetting::Update instead. It brings type coercion, dependency ordering, and the deprecation/shadowing/visibility/configurability policies — notably fixing a case where the wizard reported success but silently did nothing when default_theme_id was shadowed by a GlobalSetting. It opens its own transaction, so the step moves out of ours, which now wraps only the theme and palette writes. default_theme_id is hidden, so it's passed via allow_changing_hidden. Also extracts the palette selectability writes into a dedicated action, and reverts the transaction option plumbing added to the service base, which no longer has a caller. |
||
|---|---|---|
| .. | ||
| environments | ||
| imagemagick | ||
| initializers | ||
| locales | ||
| application.rb | ||
| boot.rb | ||
| cdn.yml.sample | ||
| database.yml | ||
| deploy.rb.sample | ||
| dev_defaults.yml | ||
| discourse.config.sample | ||
| discourse.pill.sample | ||
| discourse_defaults.conf | ||
| environment.rb | ||
| logrotate.conf | ||
| multisite.yml.production-sample | ||
| nginx.sample.conf | ||
| official_plugins.json | ||
| pitchfork.conf.rb | ||
| projections.json | ||
| routes.rb | ||
| sidekiq.yml | ||
| site_settings.yml | ||
| spring.rb | ||
| thin.yml.sample | ||
| unicorn_launcher | ||