From d36cc22d392c1b77172d76860a1c888b687c451a Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Tue, 26 Nov 2019 17:38:49 +0100 Subject: [PATCH 1/2] NEW get company info by API --- htdocs/api/class/api_setup.class.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/htdocs/api/class/api_setup.class.php b/htdocs/api/class/api_setup.class.php index 72ad45921d5..6b1c7eb6ee9 100644 --- a/htdocs/api/class/api_setup.class.php +++ b/htdocs/api/class/api_setup.class.php @@ -1326,7 +1326,21 @@ class Setup extends DolibarrApi return $list; } + + /** + * Get properties of company + * + * @url GET /company + * + * @return array|mixed Data without useless information + * + */ + public function getCompany() + { + global $mysoc; + return $this->_cleanObjectDatas($mysoc); + } /** * Do a test of integrity for files and setup. From 247ef7b6195a65e57865c09b98aa0b217a6c79a0 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Tue, 26 Nov 2019 16:40:45 +0000 Subject: [PATCH 2/2] Fixing style errors. --- htdocs/api/class/api_setup.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/api/class/api_setup.class.php b/htdocs/api/class/api_setup.class.php index 6b1c7eb6ee9..0dfdc9362ed 100644 --- a/htdocs/api/class/api_setup.class.php +++ b/htdocs/api/class/api_setup.class.php @@ -1326,7 +1326,7 @@ class Setup extends DolibarrApi return $list; } - + /** * Get properties of company *