Changeset 878
- Timestamp:
- 12/26/07 17:44:08 (4 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 3 edited
-
common/diff.php (added)
-
www/controllers/textblock.php (modified) (1 diff)
-
www/static/css/screen.css (modified) (1 diff)
-
www/views/textblock_diff.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/www/controllers/textblock.php
r877 r878 91 91 log_assert_valid(textblock_validate($revto)); 92 92 93 $diff_title = string_diff(array($revfrom['title'], $revto['title']));94 $diff_content = string_diff(array($revfrom['text'], $revto['text']));93 $diff_title = diff_inline(array($revfrom['title'], $revto['title'])); 94 $diff_content = diff_inline(array($revfrom['text'], $revto['text'])); 95 95 96 96 $view = array(); -
trunk/www/static/css/screen.css
r877 r878 703 703 } 704 704 705 .diff del { 706 background-color: #EE9999; 707 text-decoration: none; 708 } 709 710 .diff ins { 711 background-color: #99EE99; 712 text-decoration: none; 713 } 714 705 715 706 716 /* Wiki text block */ -
trunk/www/views/textblock_diff.php
r877 r878 18 18 echo '<span class="'.$op['type'].'">'; 19 19 foreach ($op['lines'] as $line) { 20 echo str_replace(' ', ' ', htmlentities($line)); 21 echo '<br/>'; 20 $output = ""; 21 if (!is_array($line)) { 22 $output = htmlentities($line); 23 } else { 24 // line contains inline diff 25 foreach ($line as $chunk) { 26 if ($chunk['type'] != 'normal') { 27 $output .= '<'.$chunk['type'].'>'; 28 } 29 $output .= htmlentities($chunk['string']); 30 if ($chunk['type'] != 'normal') { 31 $output .= '</'.$chunk['type'].'>'; 32 } 33 } 34 } 35 36 // make sure we display whitespace correctly 37 $output = str_replace(' ', ' ', $output); 38 echo $output.'<br/>'; 22 39 } 23 40 echo '</span>';
Note: See TracChangeset
for help on using the changeset viewer.
![[infoarena] development](/chrome/site/logo.png)