function _revisioning_view_revision in Revisioning 7
Same name and namespace in other branches
- 8 revisioning.module \_revisioning_view_revision()
- 6.4 revisioning.module \_revisioning_view_revision()
- 6.3 revisioning.module \_revisioning_view_revision()
Callback to view a particular revision.
1 string reference to '_revisioning_view_revision'
- revisioning_menu in ./
revisioning.module - Implements hook_menu().
File
- ./
revisioning.module, line 1147 - Allows content to be updated and reviewed before submitting it for publication, while the current live revision remains unchanged and publicly visible until the changes have been reviewed and found fit for publication by a moderator.
Code
function _revisioning_view_revision($node) {
if (isset($node->nid)) {
// For Panels, see [#1567880]
$router_item = menu_get_item('node/' . $node->nid);
if (!empty($router_item['include_file'])) {
$path = DRUPAL_ROOT . '/';
// $_SERVER['DOCUMENT_ROOT'] . base_path();
require_once $path . $router_item['include_file'];
}
// Call whatever function is assigned to the main node path but pass the
// current node as an argument. This approach allows for the reuse of Panel
// definition acting on node/%node.
if (isset($router_item['page_callback'])) {
return $router_item['page_callback']($node);
}
}
// This is the callback used by node.module for node/%node/revisions/%/view
return node_show($node, TRUE);
}