diff --git a/DOCS/configuration.md b/DOCS/configuration.md index 5ead30a..2c94662 100644 --- a/DOCS/configuration.md +++ b/DOCS/configuration.md @@ -4,10 +4,6 @@ This document describes the `config.ini` directives. It's an INI file, parsed by ## `[common]` -### `root-path` - -Filesystem path to the directory where the root of the program is installed. - ### `public_domains[]` Allowed server names. Used to make the authentication tokens specific to the service. diff --git a/config.ini b/config.ini index 4d95fb3..c27174d 100644 --- a/config.ini +++ b/config.ini @@ -1,7 +1,6 @@ ; Directives here are described in DOCS/configuration.md [common] -root_path = "/srv/servnest/core" public_domains[] = "servnest.test" prefix = "" service_name = "ServNest" diff --git a/pg-act/reg/register.php b/pg-act/reg/register.php index 130d108..2646073 100644 --- a/pg-act/reg/register.php +++ b/pg-act/reg/register.php @@ -20,7 +20,7 @@ $domain = formatAbsoluteDomain($_POST['subdomain'] . '.' . $_POST['suffix']); if (query('select', 'registry', ['domain' => $domain], 'domain') !== []) output(403, _('This domain is already registered.')); -if (in_array($_POST['subdomain'], explode(LF, file_get_contents(CONF['common']['root_path'] . '/pg-act/reg/reserved.txt')))) +if (in_array($_POST['subdomain'], explode(LF, file_get_contents(ROOT_PATH . '/pg-act/reg/reserved.txt')))) output(403, _('This domain is reserved.')); rateLimit(); diff --git a/router.php b/router.php index c26026b..d4d3a26 100644 --- a/router.php +++ b/router.php @@ -1,7 +1,8 @@