You are here

function workbench_moderation_node_revisions_redirect in Workbench Moderation 7.2

Same name and namespace in other branches
  1. 7.3 workbench_moderation.module \workbench_moderation_node_revisions_redirect()
  2. 7 workbench_moderation.module \workbench_moderation_node_revisions_redirect()

Redirects 'node/%node/revisions' to node/%node/moderation

workbench_moderation_menu_alter() changes the page callback for 'node/%node/revisions' to this function

Parameters

$node: The node being acted upon.

1 string reference to 'workbench_moderation_node_revisions_redirect'
workbench_moderation_menu_alter in ./workbench_moderation.module
Implements hook_menu_alter().

File

./workbench_moderation.module, line 295
workbench_moderation.module

Code

function workbench_moderation_node_revisions_redirect($node) {
  drupal_goto('node/' . $node->nid . '/moderation');

  /**
  * @todo Revisit this additional logic from version 1.x
    // Redirect node types subject to moderation.
    if (workbench_moderation_node_type_moderated($node->type) === TRUE) {
   drupal_goto('node/' . $node->nid . '/moderation');
    }
    // Return the normal node revisions page for unmoderated types.
    else {

   if (module_exists('diff')) {
     return diff_diffs_overview($node);
   }
   else {
     return node_revision_overview($node);
   }
    }
  *
  */
}