function node_limit_load in Node Limit 7
Same name and namespace in other branches
- 8 old/node_limit.module \node_limit_load()
- 6 node_limit.module \node_limit_load()
Loads a node limit.
Parameters
$lid: The limit id.
Return value
FALSE if the limit couldn't be loaded; otherwise the limit rule.
1 call to node_limit_load()
- _node_limit_violates_limit in ./
node_limit.module - Helper function to check limit violations for this node. Always returns FALSE for user 1.
File
- ./
node_limit.module, line 655
Code
function node_limit_load($lid) {
if (!is_numeric($lid)) {
return FALSE;
}
$info = db_select('node_limit', 'nl')
->fields('nl')
->condition('lid', $lid)
->execute()
->fetchAssoc();
if ($info['lid'] == $lid && intval($lid) >= 0) {
//load up the information from the other modules
//perhaps this isn't necessary. does node_limit ever use the other modules info?
//yes (for setting the default state of the "applies" checkbox when editing a limit)
$res = module_invoke_all('node_limit_load', $lid);
return array_merge($info, $res);
}
else {
return FALSE;
}
}