From: Andrew Garrett Date: Thu, 26 Mar 2009 13:29:38 +0000 (+0000) Subject: Fast short-circuit for diffs between identical strings X-Git-Tag: 1.31.0-rc.0~42342 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/journal.php?a=commitdiff_plain;h=63fca924cc119a7dca5272c3a37570f88c80b39d;p=lhc%2Fweb%2Fwiklou.git Fast short-circuit for diffs between identical strings --- diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 0807f0be52..9afb3ad2b7 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -1393,6 +1393,10 @@ function wfMerge( $old, $mine, $yours, &$result ){ * @return string Unified diff of $before and $after */ function wfDiff( $before, $after, $params = '-u' ) { + if ($before == $after) { + return ''; + } + global $wgDiff; # This check may also protect against code injection in