Skip to content

Allow overriding HashOver HTTP root directory #216

Open
CyberShadow wants to merge 6 commits into
jacobwb:masterfrom
CyberShadow:set-root
Open

Allow overriding HashOver HTTP root directory #216
CyberShadow wants to merge 6 commits into
jacobwb:masterfrom
CyberShadow:set-root

Conversation

@CyberShadow
Copy link
Copy Markdown
Contributor

Fixes #211.

Last commit (secrets.ini template) depends on the first part of #213.

CyberShadow and others added 6 commits March 5, 2018 08:46
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.).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant