function internal_nodes_node_view in Internal Nodes 7
Implements hook_node_view().
File
- ./
internal_nodes.module, line 460 - Internal nodes
Code
function internal_nodes_node_view($node, $view_mode, $langcode) {
if (user_access('blocked node status')) {
$action = $node->internal_nodes['action'];
// If node view would be blocked, show status message
if ($action != INTERNAL_NODES_FOUND && arg(0) == 'node' && arg(1) == $node->nid && arg(2) == FALSE) {
$actions = internal_nodes_get_actions();
// $actions is already sanitized.
drupal_set_message(t('!action - Node view blocked.', array(
'!action' => $actions[$action],
)), 'status', FALSE);
}
}
}