From 13ea23c4847c490be0294fb4b3f6147721321d4d Mon Sep 17 00:00:00 2001 From: "This, that and the other" Date: Thu, 24 Jul 2014 17:41:02 +1000 Subject: [PATCH] Remove unused XMLReader2 class Undocumented and unused within core. Was previously used in WikiImporter, but that use was removed in r81437. Change-Id: I45f4ff3fae19a7d9c1a0dacb2e02d53ee4bdaefb --- RELEASE-NOTES-1.24 | 1 + includes/AutoLoader.php | 1 - includes/Import.php | 24 ------------------------ 3 files changed, 1 insertion(+), 25 deletions(-) diff --git a/RELEASE-NOTES-1.24 b/RELEASE-NOTES-1.24 index cd24ef0bb0..335495715e 100644 --- a/RELEASE-NOTES-1.24 +++ b/RELEASE-NOTES-1.24 @@ -321,6 +321,7 @@ changes to languages because of Bugzilla reports. * HistoryPage - Use HistoryAction directly * RawPage - Use RawAction directly * StubContLang - Use Language::factory() instead +* XMLReader2 - Use XMLReader directly == Compatibility == diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php index f35b38052c..ab5af1b2d0 100644 --- a/includes/AutoLoader.php +++ b/includes/AutoLoader.php @@ -193,7 +193,6 @@ $wgAutoloadLocalClasses = array( 'Xml' => 'includes/Xml.php', 'XmlDumpWriter' => 'includes/Export.php', 'XmlJsCode' => 'includes/Xml.php', - 'XMLReader2' => 'includes/Import.php', 'XmlSelect' => 'includes/Xml.php', # includes/actions diff --git a/includes/Import.php b/includes/Import.php index 8eab3be001..2eb5667e73 100644 --- a/includes/Import.php +++ b/includes/Import.php @@ -1050,30 +1050,6 @@ class UploadSourceAdapter { } } -class XMLReader2 extends XMLReader { - - /** - * @return bool|string - */ - function nodeContents() { - if ( $this->isEmptyElement ) { - return ""; - } - $buffer = ""; - while ( $this->read() ) { - switch ( $this->nodeType ) { - case XmlReader::TEXT: - case XmlReader::SIGNIFICANT_WHITESPACE: - $buffer .= $this->value; - break; - case XmlReader::END_ELEMENT: - return $buffer; - } - } - return $this->close(); - } -} - /** * @todo document (e.g. one-sentence class description). * @ingroup SpecialPage -- 2.20.1