You are here

function services_admin_browse_test_submit in Services 6.2

Same name and namespace in other branches
  1. 5 services_admin_browse.inc \services_admin_browse_test_submit()
  2. 6 services_admin_browse.inc \services_admin_browse_test_submit()
  3. 7 services_admin_browse.inc \services_admin_browse_test_submit()

Submit callback for services_admin_browse_test().

File

./services_admin_browse.inc, line 178
Browser thru all services and servers.

Code

function services_admin_browse_test_submit($form, $form_state) {
  global $_services_admin_browse_test_submit_result;
  $method = services_method_get(arg(4));
  $args = services_admin_browse_test_unserialize_args($form_state['values']['arg'], $form_state['values']['format']);

  // Allow the authentication module to handle submitted values.
  services_auth_invoke('alter_browse_form_submit', $method, $args);
  $result = services_method_call($method['method'], $args, TRUE);

  // if the devel module is installed use kpr for fancy output with types
  if (function_exists('kpr')) {
    $_services_admin_browse_test_submit_result = kpr($result, true);
  }
  else {
    $_services_admin_browse_test_submit_result = '<pre>' . htmlspecialchars(print_r($result, TRUE)) . '</pre>';
  }
}