Update zabbix.api.php

This commit is contained in:
Namhyeon Go 2019-04-16 09:53:40 +09:00 committed by GitHub
parent 28877bbdbe
commit 2e73954e1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,8 +21,9 @@ if(!check_function_exists("get_zabbix_config")) {
}
if(!check_function_exists("zabbix_get_base_url")) {
function zabbix_get_api_url($host, $protocol="http") {
return sprintf("%s://%s/zabbix/api_jsonrpc.php", $protocol, $host);
function zabbix_get_api_url() {
$cnf = get_zabbix_config();
return sprintf("%s://%s/zabbix/api_jsonrpc.php", $cnf['protocol'], $cnf['host']);
}
}