You are here

function _addanother_node_add_path in Add Another 7.2

Return the best possible path to provide to the user to create another node.

2 calls to _addanother_node_add_path()
addanother_node_form_submit in ./addanother.module
Form submit handler for node_form().
theme_addanother_message_message in ./addanother.module
Displays a message and link to the added/edited node after submit.

File

./addanother.module, line 322
The main file for the addanother module.

Code

function _addanother_node_add_path($node) {
  $path = 'node/add/' . _addanother_node_type_url($node->type);

  // If we are coming from a node creation path,re-use the path
  // to save additional variables.
  if (arg(0) == "node" && arg(1) == "add") {
    $path = $_GET['q'];
  }
  return $path;
}