1 |
85ad3d82
|
Assos Assos
|
<?php
|
2 |
|
|
|
3 |
|
|
/**
|
4 |
|
|
* @file
|
5 |
|
|
* Display Suite revision callback.
|
6 |
|
|
*/
|
7 |
|
|
|
8 |
|
|
/**
|
9 |
|
|
* Menu callback: show an individual revision node using the revision view mode.
|
10 |
|
|
*/
|
11 |
|
|
function ds_revision_node_show($node, $message = NULL) {
|
12 |
|
|
|
13 |
|
|
drupal_set_title(t('Revision of %title from %date', array('%title' => $node->title, '%date' => format_date($node->revision_timestamp))), PASS_THROUGH);
|
14 |
|
|
|
15 |
|
|
// Update the history table, stating that this user viewed this node.
|
16 |
|
|
node_tag_new($node);
|
17 |
|
|
|
18 |
|
|
// Determine view mode.
|
19 |
|
|
$layout = ds_get_layout('node', $node->type, 'revision', FALSE);
|
20 |
|
|
$view_mode = ($layout) ? 'revision' : 'full';
|
21 |
|
|
drupal_static('ds_view_mode', $view_mode);
|
22 |
|
|
|
23 |
|
|
// For markup consistency with other pages, use node_view_multiple() rather than node_view().
|
24 |
|
|
return node_view_multiple(array($node->nid => $node), $view_mode);
|
25 |
|
|
} |