function clone_node_check

cis7 clone.pages.inc clone_node_check($node)
cle7 clone.pages.inc clone_node_check($node)
elmsmedia7 clone.pages.inc clone_node_check($node)
icor7 clone.pages.inc clone_node_check($node)
meedjum_blog7 clone.pages.inc clone_node_check($node)
mooc7 clone.pages.inc clone_node_check($node)

Menu callback: prompt the user to confirm the operation

1 string reference to 'clone_node_check'
clone_menu in sites/all/modules/ulmus/node_clone/clone.module
Implementation of hook_menu().

File

sites/all/modules/ulmus/node_clone/clone.pages.inc, line 76
Additional functions for Node_Clone module.

Code

function clone_node_check($node) {

  $method = variable_get('clone_method', 'prepopulate');

  switch ($method) {
    case 'save-edit':
      if (variable_get('clone_nodes_without_confirm', FALSE)) {
        $new_nid = clone_node_save($node->nid);
        $options = array();
        if (!empty($_GET['node-clone-destination'])) {
          $options['query']['destination'] = $_GET['node-clone-destination'];
        }
        drupal_goto('node/' . $new_nid . '/edit', $options);
      }
      else {
        return drupal_get_form('clone_node_confirm', $node);
      }
      break;
    case 'prepopulate':
    default:
      return clone_node_prepopulate($node);
      break;
  }
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.