summaryrefslogtreecommitdiffstats
path: root/admin/WebConsole/includes
diff options
context:
space:
mode:
authorJavier Sánchez Parra <jsanchez@soleta.eu>2019-06-25 11:04:21 +0200
committerOpenGnSys Support Team <soporte-og@soleta.eu>2019-06-25 21:51:16 +0200
commit31c92b681b1f510e9f6fb005973126619f801311 (patch)
treea6890e7d17c82cba0d8a118b3d554885b81074fe /admin/WebConsole/includes
parentef61154356bbf5d98ccd40e3527cde8a736b93a3 (diff)
#915 Correct config file route in web API REST lib
The "magic" constant __DIR__ ensure a correct route regardless of where the methods are used
Diffstat (limited to 'admin/WebConsole/includes')
-rw-r--r--admin/WebConsole/includes/restfunctions.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/admin/WebConsole/includes/restfunctions.php b/admin/WebConsole/includes/restfunctions.php
index ec5927ac..b24a3353 100644
--- a/admin/WebConsole/includes/restfunctions.php
+++ b/admin/WebConsole/includes/restfunctions.php
@@ -25,7 +25,7 @@ define('OG_REST_PARAM_RUN', 'run');
define('OG_REST_PARAM_TYPE', 'type');
define('OG_REST_PARAM_STATE', 'state');
-$conf_file = parse_ini_file('../../etc/ogAdmRepo.cfg');
+$conf_file = parse_ini_file(__DIR__ . '/../../etc/ogAdmRepo.cfg');
define('OG_REST_API_TOKEN', 'Authorization: ' . $conf_file['ApiToken']);
function common_request($command, $type, $data = null) {