function _DiffEngine::_line_hash in Diff 7.2
Same name and namespace in other branches
- 5.2 DiffEngine.php \_DiffEngine::_line_hash()
- 5 DiffEngine.php \_DiffEngine::_line_hash()
- 6.2 DiffEngine.php \_DiffEngine::_line_hash()
- 6 DiffEngine.php \_DiffEngine::_line_hash()
- 7.3 DiffEngine.php \_DiffEngine::_line_hash()
Returns the whole line if it's small enough, or the MD5 hash otherwise.
File
- ./
DiffEngine.php, line 241 - A PHP diff engine for phpwiki. (Taken from phpwiki-1.3.3)
Class
- _DiffEngine
- Class used internally by Diff to actually compute the diffs.
Code
function _line_hash($line) {
if (drupal_strlen($line) > $this
->MAX_XREF_LENGTH()) {
return md5($line);
}
else {
return $line;
}
}