Skip to content
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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow overriding HashOver HTTP root directory #216

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

CyberShadow
Copy link
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.

None yet

1 participant