Consider the following, current code:

  if (isset($result['node'])) {
    $nidobj = array_pop($result['node']);
    drupal_goto('node/' . $nidobj->nid);
  }

Is the following to replace the drupal_goto() any better for any reason? I think drupal_goto is server-side "redirect" and not really a client redirect, so net difference == ?

    return node_page_view(entity_load('node', $nidobj->nid));

Comments

rolando.alevelbeyond’s picture

Not really sure if it makes a difference but check this out before you make any changes..
http://drupal.org/node/1553180