Allow overriding HashOver HTTP root directory #216
Open
CyberShadow wants to merge 6 commits into
Open
Conversation
Previously, users needed to edit the secrets.php file before they could use HashOver. This requirement posed a number of problems, such as a needlessly-complicated upgrade procedure. This commit moves the configuration to an .ini file in the config/ directory. A secrets.ini is not included - instead, there is a secrets.ini.sample file, which users can copy to secrets.ini before editing. This allows simpler upgrades by means of a 'git pull' or 'tar xf ...'. The .ini file format was chosen as it is directly supported by the PHP core (as INI support is needed by PHP itself to read php.ini), allows comments (unlike JSON), and has a simple and obvious syntax. Moving the file to be edited away from backend/classes/ and into config/ also makes it more discoverable.
Avoids mysterious errors such as attempting to load resources from 'hover-next/...'.
Though not really a "secret", it cannot be set in the .json file (as the administration interface can't work without a correct HTTP root), and a PHP define is ineffective because it needs to be defined for every PHP entry point (i.e. not just comments.php, but also comments-ajax.php etc.).
This file contains hidden or 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
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.
Fixes #211.
Last commit (
secrets.initemplate) depends on the first part of #213.