|
Moodle
2.2.1
http://www.collinsharper.com
|
Go to the source code of this file.
Data Structures | |
| class | ouwiki_line |
| class | ouwiki_word |
| class | ouwiki_change_range |
| class | ouwiki_changes |
Namespaces | |
| namespace | ouwiki |
Functions | |
| ouwiki_diff_internal ($file1, $file2) | |
| ouwiki_diff_merge (&$K, &$k, $i, &$E, $p, &$candidates) | |
| ouwiki_diff_sort_v ($a, $b) | |
| ouwiki_diff_find_last (&$V, &$E, $hash) | |
| ouwiki_diff_html_to_lines ($content) | |
| ouwiki_diff_internal_flip ($diff, $count2) | |
| ouwiki_diff_words ($lines1, $lines2) | |
| ouwiki_diff ($file1, $file2) | |
| ouwiki_diff_add_markers ($html, $words, $markerclass, $beforetext, $aftertext) | |
| ouwiki_diff_html ($html1, $html2) | |
| ouwiki_diff | ( | $ | file1, |
| $ | file2 | ||
| ) |
Runs diff and interprets results into ouwiki_changes object.
| array | $file1 | Array of lines in file 1. The first line in the file MUST BE INDEX 1 NOT ZERO!! |
| array | $file2 | Array of lines in file 2, again starting from 1. |
Definition at line 669 of file difflib.php.


| ouwiki_diff_add_markers | ( | $ | html, |
| $ | words, | ||
| $ | markerclass, | ||
| $ | beforetext, | ||
| $ | aftertext | ||
| ) |
Adds HTML span elements to $html around the words listed in $words.
| string | $html | HTML content |
| array | $words | Array of ouwiki_word to mark |
| string | $markerclass | Name of class for span element |
Definition at line 680 of file difflib.php.

| ouwiki_diff_find_last | ( | &$ | V, |
| &$ | E, | ||
| $ | hash | ||
| ) |
| ouwiki_diff_html | ( | $ | html1, |
| $ | html2 | ||
| ) |
Compares two HTML files. (This is the main function that everything else supports.)
| string | $html1 | XHTML for file 1 |
| string | $html2 | XHTML for file 2 |
Definition at line 718 of file difflib.php.

| ouwiki_diff_html_to_lines | ( | $ | content | ) |
Prepares XHTML content for text difference comparison.
| string | $content | XHTML content [NO SLASHES] |
Definition at line 382 of file difflib.php.

| ouwiki_diff_internal | ( | $ | file1, |
| $ | file2 | ||
| ) |
Basic diff utility function, using standard diff algorithm.
Based on Bell Laboratories Computing Science Technical Report #41, July 1976, Hunt & McIlroy, Appendix A.1 and A.3.
http://www.cs.dartmouth.edu/~doug/diff.ps
| array | $file1 | Array of lines in file 1. The first line in the file MUST BE INDEX 1 NOT ZERO!! |
| array | $file2 | Array of lines in file 2, again starting from 1. |
Definition at line 27 of file difflib.php.


| ouwiki_diff_internal_flip | ( | $ | diff, |
| $ | count2 | ||
| ) |
Flips around the array returned by ouwiki_diff_internal so that it refers to lines from the other file.
| array | $diff | Array of index1=>index2 |
| int | $count2 | Count of lines in file 2 |
Definition at line 566 of file difflib.php.

| ouwiki_diff_merge | ( | &$ | K, |
| &$ | k, | ||
| $ | i, | ||
| &$ | E, | ||
| $ | p, | ||
| &$ | candidates | ||
| ) |
| ouwiki_diff_sort_v | ( | $ | a, |
| $ | b | ||
| ) |
Definition at line 223 of file difflib.php.
| ouwiki_diff_words | ( | $ | lines1, |
| $ | lines2 | ||
| ) |
Compares two files based initially on lines and then on words within the lines that differ.
| array | $lines1 | Array of ouwiki_line |
| array | $lines2 | Array of ouwiki_line |
Definition at line 587 of file difflib.php.

