r84861 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84860‎ | r84861 | r84862 >
Date:17:18, 27 March 2011
Author:platonides
Status:ok
Tags:
Comment:
Stop after replaceing the first instance
Modified paths:
  • /trunk/phase3/includes/DjVuImage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/DjVuImage.php
@@ -270,7 +270,7 @@
271271 EOR;
272272 $txt = preg_replace_callback( $reg, array( $this, 'pageTextCallback' ), $txt );
273273 $txt = "<DjVuTxt>\n<HEAD></HEAD>\n<BODY>\n" . $txt . "</BODY>\n</DjVuTxt>\n";
274 - $xml = preg_replace( "/<DjVuXML>/", "<mw-djvu><DjVuXML>", $xml );
 274+ $xml = preg_replace( "/<DjVuXML>/", "<mw-djvu><DjVuXML>", $xml, 1 );
275275 $xml = $xml . $txt. '</mw-djvu>' ;
276276 }
277277 }

Status & tagging log