summaryrefslogtreecommitdiffstats
path: root/admin/WebConsole/includes/restfunctions.php
diff options
context:
space:
mode:
authorJavier Sánchez Parra <jsanchez@soleta.eu>2019-10-14 12:35:11 +0200
committerRamón M. Gómez <ramongomez@us.es>2019-10-14 14:15:34 +0200
commit436abc7095b6d72df74c4193b5051c2b9399b325 (patch)
treebb31fce772d72a7342390b45e7e3a781178f9781 /admin/WebConsole/includes/restfunctions.php
parentde36dbe3e033896de9e9438f8db8f2af9251b4af (diff)
#915 Change WebConsole to read API token from ogAdmServer.cfg
This commit changes restfunctions.php to read the API token of ogAmdServer from ogAdmRepo.cfg to ogAdmServer.cfg. This way it avoids possible communication errors if ogAdmRepo.cfg and ogAdmServer.cfg are desynced. In order to restfuntions.php can read ogAdmServer.cfg this commit also changes the permissions of the file.
Diffstat (limited to 'admin/WebConsole/includes/restfunctions.php')
-rw-r--r--admin/WebConsole/includes/restfunctions.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/admin/WebConsole/includes/restfunctions.php b/admin/WebConsole/includes/restfunctions.php
index d27fdad0..fe331153 100644
--- a/admin/WebConsole/includes/restfunctions.php
+++ b/admin/WebConsole/includes/restfunctions.php
@@ -61,8 +61,8 @@ define('OG_REST_PARAM_DIFF_ID', 'diff_id');
define('OG_REST_PARAM_DIFF_NAME', 'diff_name');
define('OG_REST_PARAM_METHOD', 'method');
-$conf_file = parse_ini_file(__DIR__ . '/../../etc/ogAdmRepo.cfg');
-define('OG_REST_API_TOKEN', 'Authorization: ' . $conf_file['ApiToken']);
+$conf_file = parse_ini_file(__DIR__ . '/../../etc/ogAdmServer.cfg');
+define('OG_REST_API_TOKEN', 'Authorization: ' . $conf_file['APITOKEN']);
function common_request($command, $type, $data = null) {