You are here

function node_limit_save in Node Limit 6

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

Callback to save a node limit back to the database.

2 calls to node_limit_save()
node_limit_clone_limit in ./node_limit.module
Callback to clone a limit.
node_limit_limit_form_submit in ./node_limit.module
Submission hook for node_limit_limit_form.

File

./node_limit.module, line 513
Module to restrict the number of nodes a user or role may create.

Code

function node_limit_save($limit) {
  node_limit_delete($limit['lid']);
  db_query("INSERT INTO {node_limit} VALUES('%d', '%d', '%s', '%d')", $limit['lid'], $limit['nlimit'], $limit['title'], $limit['weight']);
  drupal_set_message(print_r($limit, true));
  $modules = module_implements('node_limit_save');
  foreach ($modules as $module) {
    module_invoke($module, 'node_limit_save', $limit['lid'], isset($limit[$module]), $limit[$module]);
  }
}