function _revisioning_view_revision in Revisioning 6.3
Same name and namespace in other branches
- 8 revisioning.module \_revisioning_view_revision()
- 6.4 revisioning.module \_revisioning_view_revision()
- 7 revisioning.module \_revisioning_view_revision()
Callback to view a particular revision.
1 string reference to '_revisioning_view_revision'
- revisioning_menu in ./
revisioning.module - Implementation of hook_menu().
File
- ./
revisioning.module, line 887 - Allows the creation and modification of pre-published as well as live content while the current revision remains unchanged and publicly visible until the changes have been reviewed by a moderator.
Code
function _revisioning_view_revision($node) {
if (isset($node->nid) && module_exists('panels')) {
$router_item = menu_get_item('node/' . $node->nid);
if (!empty($router_item['file'])) {
$path = $_SERVER['DOCUMENT_ROOT'] . base_path();
require_once $path . $router_item['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. See [#1567880].
if (isset($router_item['page_callback'])) {
return $router_item['page_callback']($node);
}
}
return node_page_view($node);
}