r48876 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r48875‎ | r48876 | r48877 >
Date:13:29, 26 March 2009
Author:werdna
Status:ok
Tags:
Comment:
Fast short-circuit for diffs between identical strings
Modified paths:
  • /trunk/phase3/includes/GlobalFunctions.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/GlobalFunctions.php
@@ -1393,6 +1393,10 @@
13941394 * @return string Unified diff of $before and $after
13951395 */
13961396 function wfDiff( $before, $after, $params = '-u' ) {
 1397+ if ($before == $after) {
 1398+ return '';
 1399+ }
 1400+
13971401 global $wgDiff;
13981402
13991403 # This check may also protect against code injection in

Status & tagging log