Extension talk:WikEdDiff

From MediaWiki.org
Jump to navigation Jump to search

Patch still required for MW 1.25[edit]

The installation section mentions that MW before 1.25 requires patching. But patching is still required for MW 1.25.

Patch file for MW 1.25.1
--- DifferenceEngine.php.orig   2015-06-23 06:59:38.384275180 +0000
+++ DifferenceEngine.php        2015-06-23 07:01:14.164358976 +0000
@@ -832,6 +832,13 @@

                $otext = str_replace( "\r\n", "\n", $otext );
                $ntext = str_replace( "\r\n", "\n", $ntext );
+
+               # Custom difference engine hook
+               $diffText = '';
+               if ( !wfRunHooks( 'GenerateTextDiffBody', array( &$otext, &$ntext, &$diffText ) ) ) {
+                       wfProfileOut( __METHOD__ );
+                       return $diffText;
+               }

                if ( $wgExternalDiffEngine == 'wikidiff' && function_exists( 'wikidiff_do_diff' ) ) {
                        # For historical reasons, external diff engine expects

It would be handy to have something like a MW_1.25.patch file in the repo to be able to apply the patches with provisioning tools.

--Planetenxin (talk) 06:53, 23 June 2015 (UTC)