コード例 #1
0
ファイル: data_query.php プロジェクト: songchin/Cacti
function get_script_query_path($args, $script_path, $host_id) {
	global $config;

	include_once($config["library_path"] . "/variables.php");

	/* get any extra arguments that need to be passed to the script */
	if (!empty($args)) {
		$extra_arguments = substitute_host_data($args, "|", "|", $host_id);
	}else{
		$extra_arguments = "";
	}

	/* get a complete path for out target script */
	return substitute_script_query_path($script_path) . " $extra_arguments";
}
コード例 #2
0
ファイル: data_query.php プロジェクト: songchin/Cacti
/** get_script_query_path - builds the complete script query executable path
   @param array $args 			- the variable that contains any arguments to be appended to the argument
	list (variables will be substituted in this function)
   @param string $script_path 	- the path on the disk to the script file
   @param int $device_id 		- the id of the device that this script query belongs to
   @return string 				- a full path to the script query script containing all arguments */
function get_script_query_path($args, $script_path, $device_id) {
	global $config;

	include_once(CACTI_BASE_PATH . "/lib/variables.php");

	/* get any extra arguments that need to be passed to the script */
	if (!empty($args)) {
		$extra_arguments = substitute_device_data($args, "|", "|", $device_id, true);
	}else{
		$extra_arguments = "";
	}

	/* get a complete path for out target script */
	return substitute_script_query_path($script_path) . " $extra_arguments";
}