Commit 186ebd18 authored by Dries's avatar Dries

- Patch #42072 by m3avrck: more improvements to the node revesion overview screen.

parent baaf319c
......@@ -332,6 +332,9 @@ tr.odd .form-item, tr.even .form-item {
margin-left: 0.5em;
clear: right;
}
td.revision-current {
background: #ffc;
}
dl.multiselect dd.b, dl.multiselect dd.b .form-item, dl.multiselect dd.b select {
font-family: inherit;
font-size: inherit;
......
......@@ -524,7 +524,7 @@ function node_view($node, $teaser = FALSE, $page = FALSE, $links = TRUE) {
$node->body = str_replace('<!--break-->', '', $node->body);
if ($node->log != '' && !$teaser && $node->moderate) {
$node->body .= '<div class="log"><div class="title">'. t('Log') .':</div>'. check_plain($node->log) .'</div>';
$node->body .= '<div class="log"><div class="title">'. t('Log') .':</div>'. filter_xss($node->log) .'</div>';
}
// The 'view' hook can be implemented to overwrite the default function
......@@ -1290,13 +1290,13 @@ function node_revision_overview($node) {
if ($revision->current_vid > 0) {
$row[] = array('data' => t('%date by %username', array('%date' => l(format_date($revision->timestamp, 'small'), "node/$node->nid"), '%username' => theme('username', $revision)))
. (($revision->log != '') ? '<p class="revision-log">'. check_plain($revision->log) .'</p>' : ''),
. (($revision->log != '') ? '<p class="revision-log">'. filter_xss($revision->log) .'</p>' : ''),
'class' => 'revision-current');
$operations[] = array('data' => theme('placeholder', t('current revision')), 'class' => 'revision-current', 'colspan' => 2);
}
else {
$row[] = t('%date by %username', array('%date' => l(format_date($revision->timestamp, 'small'), "node/$node->nid/revisions/$revision->vid/view"), '%username' => theme('username', $revision)))
. (($revision->log != '') ? '<p class="revision-log">'. check_plain($revision->log) .'</p>' : '');
. (($revision->log != '') ? '<p class="revision-log">'. filter_xss($revision->log) .'</p>' : '');
if ($revert_permission) {
$operations[] = l(t('revert'), "node/$node->nid/revisions/$revision->vid/revert");
}
......
......@@ -524,7 +524,7 @@ function node_view($node, $teaser = FALSE, $page = FALSE, $links = TRUE) {
$node->body = str_replace('<!--break-->', '', $node->body);
if ($node->log != '' && !$teaser && $node->moderate) {
$node->body .= '<div class="log"><div class="title">'. t('Log') .':</div>'. check_plain($node->log) .'</div>';
$node->body .= '<div class="log"><div class="title">'. t('Log') .':</div>'. filter_xss($node->log) .'</div>';
}
// The 'view' hook can be implemented to overwrite the default function
......@@ -1290,13 +1290,13 @@ function node_revision_overview($node) {
if ($revision->current_vid > 0) {
$row[] = array('data' => t('%date by %username', array('%date' => l(format_date($revision->timestamp, 'small'), "node/$node->nid"), '%username' => theme('username', $revision)))
. (($revision->log != '') ? '<p class="revision-log">'. check_plain($revision->log) .'</p>' : ''),
. (($revision->log != '') ? '<p class="revision-log">'. filter_xss($revision->log) .'</p>' : ''),
'class' => 'revision-current');
$operations[] = array('data' => theme('placeholder', t('current revision')), 'class' => 'revision-current', 'colspan' => 2);
}
else {
$row[] = t('%date by %username', array('%date' => l(format_date($revision->timestamp, 'small'), "node/$node->nid/revisions/$revision->vid/view"), '%username' => theme('username', $revision)))
. (($revision->log != '') ? '<p class="revision-log">'. check_plain($revision->log) .'</p>' : '');
. (($revision->log != '') ? '<p class="revision-log">'. filter_xss($revision->log) .'</p>' : '');
if ($revert_permission) {
$operations[] = l(t('revert'), "node/$node->nid/revisions/$revision->vid/revert");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment