-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Item12952: Refactor bootstrap, load, & save
This fixes the issue that "discovered" extension "{Module}" entries are not saved into the configuration. The issue is that the Save process clears and applies posted changes to the new configuration, but values quietly added to $Foswiki::cfg by the Configure::Pluggables:: are lost. - Eliminate the "NOT_SET" convention. Bootstrap should really set everything that's needed, or die trying. - Refactor bootstrap out from Foswiki.pm into Configure::Load. All methods of loading a configuration are in the same module now. And the TestBootstrapPlugin will be able to drive the "real thing". - Unify save/restore of "BOOTSTRAP" variables, be they set during the actual bootstrap process, or by the "Pluggables" bootstrapping of newly installed extensions. This simplifies the save code as well. There is still a major bug related to extension discovery. Configure::Pluggables::PLUGINS creates the {Plugins}{<plugin>}{Enabled} but it does not merge in the Config.spec defaults for all the other plugin settings. I can't really fix it becuase I'm not sure if the original intention is that the Config.spec be loaded in Pluggables::PLUGINS. I suspect that the jsonrpc "getcfg" function should be called to load in all the defaults. Currently only getspec is called to load the key definitions and not their values. This commit doesn't impact this either way. Extensions installed before the first run of Configure are configured correctly. Extensions installed after LocalSite.cfg exists don't get their default configuration merged.
- Loading branch information
Showing
4 changed files
with
248 additions
and
235 deletions.
There are no files selected for viewing
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
Oops, something went wrong.