Don't try to dl() the wikidiff module if it's already loaded.
authorBrion Vibber <brion@users.mediawiki.org>
Sun, 21 Nov 2004 03:54:26 +0000 (03:54 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Sun, 21 Nov 2004 03:54:26 +0000 (03:54 +0000)
includes/DifferenceEngine.php

index b217a00..c5ade6e 100644 (file)
@@ -229,7 +229,9 @@ class DifferenceEngine {
                        # input text to be HTML-escaped already
                        $otext = str_replace( "\r\n", "\n", htmlspecialchars ( $otext ) );
                        $ntext = str_replace( "\r\n", "\n", htmlspecialchars ( $ntext ) );
-                       dl('php_wikidiff.so');
+                       if( !function_exists( 'wikidiff_do_diff' ) ) {
+                               dl('php_wikidiff.so');
+                       }
                        $out .= wikidiff_do_diff( $otext, $ntext, 2 );
                } else {
                        $ota = explode( "\n", str_replace( "\r\n", "\n", $otext ) );