You are here

function services_client_scalar_result in Services Client 7

Get scalar result from services. This is change between 3.1 and 3.3 where 3.3 is returning always array value.

Parameters

$result:

3 calls to services_client_scalar_result()
services_client_make_node_call in ./services_client.module
Make the actual node create/update call for each connection and task
services_client_make_node_delete_call in ./services_client.module
Delete node on remote site.
services_client_make_user_call in ./services_client.module
Make the actual user create/update call for each connection and task

File

./services_client.module, line 535
Services client module allows to push different types of objects on different types of events such as node_save, user_save to remote masters.

Code

function services_client_scalar_result($result) {
  if (is_array($result) && count($result) == 1 && isset($result[0])) {
    return $result[0];
  }
  return $result;
}