Révision 661d64c9
Ajouté par Assos Assos il y a plus de 7 ans
drupal7/sites/all/modules/diff/diff.tokens.inc | ||
---|---|---|
38 | 38 |
// Basic diff standard comparison information. |
39 | 39 |
case 'diff': |
40 | 40 |
case 'diff-markdown': |
41 |
$revisons = node_revision_list($node); |
|
42 |
if (count($revisons) == 1) { |
|
41 |
$revisions = node_revision_list($node);
|
|
42 |
if (count($revisions) == 1) {
|
|
43 | 43 |
$replacements[$original] = t('(No previous revision available.)'); |
44 | 44 |
} |
45 | 45 |
else { |
46 | 46 |
module_load_include('inc', 'diff', 'diff.pages'); |
47 |
$old_vid = _diff_get_previous_vid($revisons, $node->vid); |
|
47 |
$old_vid = _diff_get_previous_vid($revisions, $node->vid);
|
|
48 | 48 |
$state = $name == 'diff' ? 'raw' : 'raw_plain'; |
49 | 49 |
$build = diff_diffs_show($node, $old_vid, $node->vid, $state); |
50 | 50 |
unset($build['diff_table']['#rows']['states']); |
... | ... | |
52 | 52 |
unset($build['diff_preview']); |
53 | 53 |
|
54 | 54 |
$output = drupal_render_children($build); |
55 |
$replacements[$original] = $sanitize ? check_plain($output) : $output; |
|
55 |
if ($sanitize) { |
|
56 |
$output = filter_xss($output, array('a', 'em', 'strong', 'cite', 'blockquote', 'code', 'ul', 'ol', 'li', 'dl', 'dt', 'dd', 'table', 'tr', 'th', 'td')); |
|
57 |
} |
|
58 |
$replacements[$original] = $output; |
|
56 | 59 |
} |
57 | 60 |
break; |
58 | 61 |
|
Formats disponibles : Unified diff
Weekly update of contrib modules