function node_limit_save in Node Limit 7
Same name and namespace in other branches
- 8 old/node_limit.module \node_limit_save()
- 6 node_limit.module \node_limit_save()
Callback to save a node limit back to the database.
Parameters
$limit: The limit data.
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 708
Code
function node_limit_save($limit) {
node_limit_delete($limit['lid'], TRUE);
db_insert('node_limit')
->fields(array(
'lid' => $limit['lid'],
'nlimit' => $limit['nlimit'],
'title' => $limit['title'],
'weight' => $limit['weight'],
))
->execute();
$modules = module_implements('node_limit_save');
foreach ($modules as $module) {
$applies = isset($limit[$module]);
$element = $applies ? $limit[$module] : '';
module_invoke($module, 'node_limit_save', $limit['lid'], $applies, $element);
}
}