From: Coleman Watts Date: Sat, 28 Nov 2015 02:53:07 +0000 (-0500) Subject: Minor cleanup X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=5a28e17c256e9216f11e85e833f026d2bdf9e23d;p=civicrm-core.git Minor cleanup --- diff --git a/api/class.api.php b/api/class.api.php index d91daa2b9c..6edea34b55 100644 --- a/api/class.api.php +++ b/api/class.api.php @@ -162,9 +162,13 @@ class civicrm_api3 { * * @return \stdClass */ - public function remoteCall($entity, $action, $params = array()) { - $fields = "key={$this->key}&api_key={$this->api_key}&json=" . urlencode(json_encode($params)); + private function remoteCall($entity, $action, $params = array()) { $query = $this->uri . "?entity=$entity&action=$action"; + $fields = http_build_query(array( + 'key' => $this->key, + 'api_key' => $this->api_key, + 'json' => json_encode($params), + )); if (function_exists('curl_init')) { // To facilitate debugging without leaking info, entity & action @@ -211,7 +215,7 @@ class civicrm_api3 { * * @return bool */ - public function call($entity, $action = 'Get', $params = array()) { + private function call($entity, $action = 'Get', $params = array()) { if (is_int($params)) { $params = array('id' => $params); }