You are here

function node_limit_clone_limit in Node Limit 7

Same name and namespace in other branches
  1. 8 old/node_limit.module \node_limit_clone_limit()
  2. 6 node_limit.module \node_limit_clone_limit()

Callback to clone a limit.

1 string reference to 'node_limit_clone_limit'
node_limit_menu in ./node_limit.module
Implements hook_menu().

File

./node_limit.module, line 626

Code

function node_limit_clone_limit($limit) {
  $old_title = $limit['title'];
  $limit['lid'] = _node_limit_next_limit_id();
  $limit['title'] = t('Clone of !title', array(
    '!title' => $old_title,
  ));
  node_limit_save($limit);
  drupal_set_message(t('Cloned limit "%limit"', array(
    '%limit' => $old_title,
  )));
  drupal_goto('admin/structure/node_limit');
}