function _views_send_normalize_context in Views Send 6
Normalizing the context. If token_action.module is not enabled we'll have to normalize here. Otherwise use token_normalize_context().
See also
http://drupalcontrib.org/api/function/token_normalize_context/6
1 call to _views_send_normalize_context()
- views_send_mail_action in ./
views_send.module - Main action callback.
File
- ./
views_send.module, line 884 - The Views Send module.
Code
function _views_send_normalize_context(&$context) {
if (function_exists('token_normalize_context')) {
token_normalize_context($context);
}
else {
$context['global'] = NULL;
if (empty($context['user']) && !empty($context['node'])) {
$context['user'] = user_load(array(
'uid' => $context['node']->uid,
));
}
if (empty($context['node']) && !empty($context['comment']) && !empty($context['comment']->nid)) {
$context['node'] = node_load($context['comment']->nid);
}
}
}