function subscriptions_content_load_node in Subscriptions 2.0.x
Same name and namespace in other branches
- 7 subscriptions_content.module \subscriptions_content_load_node()
Callback function for loading a node.
Loads not only the node but also any attached comments that are in the queue.
Function name stored in {subscriptions_queue}.load_func and called by subscriptions_mail().
Parameters
array $subs: The {subscriptions_queue} item.
Return value
bool
3 string references to 'subscriptions_content_load_node'
- subscriptions_content_node_insert in subscriptions_content/
subscriptions_content.module - Implements hook_node_insert().
- _subscriptions_content_access in subscriptions_content/
subscriptions_content.module - Implements _hook_access(), subhook of hook_subscriptions().
- _subscriptions_mail_preview_form in subscriptions_mail/
subscriptions_mail.mail_edit.inc - Returns the template preview subform.
File
- subscriptions_content/
subscriptions_content.module, line 715 - Subscriptions to content events.
Code
function subscriptions_content_load_node(array &$subs) {
// Do not cache because for different users the node can be different,
// subscriptions_mail_cron caches per uid.
$nid = $subs['load_args'];
_subscriptions_module_load_include('subscriptions_content', 'notify.inc');
if ($node = _subscriptions_content_load($nid)) {
if ($subs['is_new']) {
$node->_subscriptions_is_new = TRUE;
}
else {
$node->_subscriptions_is_updated = TRUE;
}
$subs['object'] = $node;
return TRUE;
}
return FALSE;
}