From 8bfda8d4eec675dc71ed34ca9d34aa02cfeefb57 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 25 Jun 2017 12:26:16 +0200 Subject: [PATCH] Code comment --- htdocs/api/class/api_access.class.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/api/class/api_access.class.php b/htdocs/api/class/api_access.class.php index 407f94ac915..b2dcfefa49f 100644 --- a/htdocs/api/class/api_access.class.php +++ b/htdocs/api/class/api_access.class.php @@ -80,25 +80,25 @@ class DolibarrApiAccess implements iAuthenticate { dol_syslog($key.' - '.$val); }*/ - + // api key can be provided in url with parameter api_key=xxx or ni header with header DOLAPIKEY:xxx $api_key = ''; - if (isset($_GET['api_key'])) + if (isset($_GET['api_key'])) { // TODO Add option to disable use of api key on url. Return errors if used. $api_key = $_GET['api_key']; // For backward compatibility } - if (isset($_GET['DOLAPIKEY'])) + if (isset($_GET['DOLAPIKEY'])) { // TODO Add option to disable use of api key on url. Return errors if used. $api_key = $_GET['DOLAPIKEY']; // With GET method } - if (isset($_SERVER['HTTP_DOLAPIKEY'])) + if (isset($_SERVER['HTTP_DOLAPIKEY'])) // Param DOLAPIKEY in header can be read with HTTP_DOLAPIKEY { $api_key = $_SERVER['HTTP_DOLAPIKEY']; // With header method (recommanded) } - - if ($api_key) + + if ($api_key) { $sql = "SELECT u.login, u.datec, u.api_key, "; $sql.= " u.tms as date_modification, u.entity";