From dcac5f193e3720c70f5eb086a9905dcda0155baa Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Wed, 28 Oct 2009 18:18:05 +0000 Subject: [PATCH] (bug 19859) Remove HTMLDiff. Could possibly be salvaged as an extension one day, but not today. DifferenceEngine and friends will need some refactoring to allow spinning this off. In the meantime, removing the mostly-broken experimental feature. Its always in the logs if anyone wants to reuse the code somewhere else one day --- RELEASE-NOTES | 2 + includes/Article.php | 3 +- includes/AutoLoader.php | 22 - includes/DefaultSettings.php | 3 - includes/HistoryPage.php | 37 +- includes/diff/DifferenceInterface.php | 130 +--- includes/diff/HTMLDiff.php | 1009 ------------------------- includes/diff/Nodes.php | 439 ----------- languages/messages/MessagesEn.php | 60 -- maintenance/language/messageTypes.inc | 1 - maintenance/language/messages.inc | 62 -- 11 files changed, 13 insertions(+), 1755 deletions(-) delete mode 100644 includes/diff/HTMLDiff.php delete mode 100644 includes/diff/Nodes.php diff --git a/RELEASE-NOTES b/RELEASE-NOTES index e3ca123461..11b6e56461 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -89,6 +89,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN maintenance * $wgCapitalLinkOverrides added to configure per-namespace capitalization * (bug 21172) $wgSorbsUrl can now be an array with multiple DNSBL +* $wgEnableHtmlDiff has been removed === New features in 1.16 === @@ -604,6 +605,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * User::isValidPassword now only returns boolean results, User::getPasswordValidity can be used to get an error message string * The error message shown in Special:ChangePassword now parses wiki markup +* (bug 19859) Removed experimental HTMLDiff feature == API changes in 1.16 == diff --git a/includes/Article.php b/includes/Article.php index 9e6545a18c..50b1c5a4c1 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -943,11 +943,10 @@ class Article { $rcid = $wgRequest->getVal( 'rcid' ); $diffOnly = $wgRequest->getBool( 'diffonly', $wgUser->getOption( 'diffonly' ) ); $purge = $wgRequest->getVal( 'action' ) == 'purge'; - $htmldiff = $wgRequest->getBool( 'htmldiff' ); $unhide = $wgRequest->getInt('unhide') == 1; $oldid = $this->getOldID(); - $de = new DifferenceEngine( $this->mTitle, $oldid, $diff, $rcid, $purge, $htmldiff, $unhide ); + $de = new DifferenceEngine( $this->mTitle, $oldid, $diff, $rcid, $purge, $unhide ); // DifferenceEngine directly fetched the revision: $this->mRevIdFetched = $de->mNewid; $de->showDiffPage( $diffOnly ); diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php index 807de081d9..6ca9ee4fb2 100644 --- a/includes/AutoLoader.php +++ b/includes/AutoLoader.php @@ -376,13 +376,7 @@ $wgAutoloadLocalClasses = array( 'IBM_DB2Field' => 'includes/db/DatabaseIbm_db2.php', # includes/diff - 'AncestorComparator' => 'includes/diff/HTMLDiff.php', - 'AnchorToString' => 'includes/diff/HTMLDiff.php', 'ArrayDiffFormatter' => 'includes/diff/DifferenceEngine.php', - 'BodyNode' => 'includes/diff/Nodes.php', - 'ChangeText' => 'includes/diff/HTMLDiff.php', - 'ChangeTextGenerator' => 'includes/diff/HTMLDiff.php', - 'DelegatingContentHandler' => 'includes/diff/HTMLDiff.php', '_DiffEngine' => 'includes/diff/DifferenceEngine.php', 'DifferenceEngine' => 'includes/diff/DifferenceInterface.php', 'DiffFormatter' => 'includes/diff/DifferenceEngine.php', @@ -392,27 +386,11 @@ $wgAutoloadLocalClasses = array( '_DiffOp_Copy' => 'includes/diff/DifferenceEngine.php', '_DiffOp_Delete' => 'includes/diff/DifferenceEngine.php', '_DiffOp' => 'includes/diff/DifferenceEngine.php', - 'DomTreeBuilder' => 'includes/diff/HTMLDiff.php', - 'DummyNode' => 'includes/diff/Nodes.php', - 'HTMLDiffer' => 'includes/diff/HTMLDiff.php', - 'HTMLOutput' => 'includes/diff/HTMLDiff.php', '_HWLDF_WordAccumulator' => 'includes/diff/DifferenceEngine.php', - 'ImageNode' => 'includes/diff/Nodes.php', - 'LastCommonParentResult' => 'includes/diff/HTMLDiff.php', 'MappedDiff' => 'includes/diff/DifferenceEngine.php', - 'Modification' => 'includes/diff/HTMLDiff.php', - 'NoContentTagToString' => 'includes/diff/HTMLDiff.php', - 'Node' => 'includes/diff/Nodes.php', 'RangeDifference' => 'includes/diff/Diff.php', 'TableDiffFormatter' => 'includes/diff/DifferenceEngine.php', - 'TagNode' => 'includes/diff/Nodes.php', - 'TagToString' => 'includes/diff/HTMLDiff.php', - 'TagToStringFactory' => 'includes/diff/HTMLDiff.php', - 'TextNode' => 'includes/diff/Nodes.php', - 'TextNodeDiffer' => 'includes/diff/HTMLDiff.php', - 'TextOnlyComparator' => 'includes/diff/HTMLDiff.php', 'UnifiedDiffFormatter' => 'includes/diff/DifferenceEngine.php', - 'WhiteSpaceNode' => 'includes/diff/Nodes.php', 'WikiDiff3' => 'includes/diff/Diff.php', 'WordLevelDiff' => 'includes/diff/DifferenceEngine.php', diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 537d52c26e..99c0d887d3 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -2892,9 +2892,6 @@ $wgMaxTocLevel = 999; /** Name of the external diff engine to use */ $wgExternalDiffEngine = false; -/** Whether to use inline diff */ -$wgEnableHtmlDiff = false; - /** Use RC Patrolling to check for vandalism */ $wgUseRCPatrol = true; diff --git a/includes/HistoryPage.php b/includes/HistoryPage.php index b866a257c5..01d95e0d16 100644 --- a/includes/HistoryPage.php +++ b/includes/HistoryPage.php @@ -359,7 +359,7 @@ class HistoryPager extends ReverseChronologicalPager { * @return string HTML output */ function getStartBody() { - global $wgScript, $wgEnableHtmlDiff, $wgUser, $wgOut, $wgContLang; + global $wgScript, $wgUser, $wgOut, $wgContLang; $this->lastRow = false; $this->counter = 1; $this->oldIdChecked = 0; @@ -385,34 +385,13 @@ class HistoryPager extends ReverseChronologicalPager { wfMsg( 'showhideselectedversions' ) ) . "\n"; } - if( $wgEnableHtmlDiff ) { - $this->buttons .= Xml::element( 'button', - array( - 'type' => 'submit', - 'name' => 'htmldiff', - 'value' => '1', - 'class' => 'historysubmit', - 'accesskey' => wfMsg( 'accesskey-visualcomparison' ), - 'title' => wfMsg( 'tooltip-compareselectedversions' ), - ), - wfMsg( 'visualcomparison') - ) . "\n"; - $this->buttons .= $this->submitButton( wfMsg( 'wikicodecomparison'), - array( - 'class' => 'historysubmit', - 'accesskey' => wfMsg( 'accesskey-compareselectedversions' ), - 'title' => wfMsg( 'tooltip-compareselectedversions' ), - ) - ) . "\n"; - } else { - $this->buttons .= $this->submitButton( wfMsg( 'compareselectedversions'), - array( - 'class' => 'historysubmit', - 'accesskey' => wfMsg( 'accesskey-compareselectedversions' ), - 'title' => wfMsg( 'tooltip-compareselectedversions' ), - ) - ) . "\n"; - } + $this->buttons .= $this->submitButton( wfMsg( 'compareselectedversions'), + array( + 'class' => 'historysubmit', + 'accesskey' => wfMsg( 'accesskey-compareselectedversions' ), + 'title' => wfMsg( 'tooltip-compareselectedversions' ), + ) + ) . "\n"; $this->buttons .= ''; $s .= $this->buttons . '