X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2FDifferenceEngine.php;h=c6f58d23036438e628ddbb23b62980ff483ce15e;hb=9f6bb34d4135617cee9f7acfe1127a91d057a4f8;hp=66edfa9fd6e9f39935b1d4d29f67384dbb20644b;hpb=3825e915befb0d0394bf3e5e120f3ba759cc9bf3;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/DifferenceEngine.php b/includes/DifferenceEngine.php index 66edfa9fd6..c6f58d2303 100644 --- a/includes/DifferenceEngine.php +++ b/includes/DifferenceEngine.php @@ -64,9 +64,39 @@ class DifferenceEngine { } function showDiffPage() { - global $wgUser, $wgTitle, $wgOut, $wgContLang, $wgOnlySysopsCanPatrol, $wgUseRCPatrol; + global $wgUser, $wgTitle, $wgOut, $wgContLang, $wgOnlySysopsCanPatrol, + $wgUseExternalEditor, $wgUseRCPatrol; $fname = 'DifferenceEngine::showDiffPage'; wfProfileIn( $fname ); + + # If external diffs are enabled both globally and for the user, + # we'll use the application/x-external-editor interface to call + # an external diff tool like kompare, kdiff3, etc. + if($wgUseExternalEditor && $wgUser->getOption('externaldiff')) { + global $wgInputEncoding,$wgServer,$wgScript,$wgLang; + $wgOut->disable(); + header ( "Content-type: application/x-external-editor; charset=".$wgInputEncoding ); + $url1=$wgTitle->getFullURL("action=raw&oldid=".$this->mOldid); + $url2=$wgTitle->getFullURL("action=raw&oldid=".$this->mNewid); + $special=$wgLang->getNsText(NS_SPECIAL); + $control=<<