You are here

function asaf_ajax_command_redirect in Asaf (ajax submit for any form) 7

Same name and namespace in other branches
  1. 8 asaf.module \asaf_ajax_command_redirect()
1 call to asaf_ajax_command_redirect()
asaf_ajax_callback in ./asaf.module

File

./asaf.module, line 654

Code

function asaf_ajax_command_redirect($href, $window = 'current') {
  if (is_array($href)) {
    $href = call_user_func_array('url', $href);
  }
  elseif (strpos($href, '://') === FALSE) {
    $href = url($href, array(
      'absolute' => TRUE,
    ));
  }
  return array(
    'command' => 'asafRedirect',
    'href' => $href,
    'window' => $window,
  );
}