From: Thiemo Mättig Date: Fri, 22 Aug 2014 14:11:30 +0000 (+0200) Subject: Drop "left in" debugging var_dump from WikiImporter X-Git-Tag: 1.31.0-rc.0~14326^2 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=bf4d36e29e4c82d8a7e2ea647eba4a18e3a6089f Drop "left in" debugging var_dump from WikiImporter I found this on accident when searching for a var_dump I forgot somewhere in my own code. We are maintaining production code here, right? Debugging and testing should be somewhere else. Also note the stray print before the var_dump. Change-Id: I98725b277039f55db9ff95399e9559a477b43c26 --- diff --git a/includes/Import.php b/includes/Import.php index e6b5dc256f..3880e25db6 100644 --- a/includes/Import.php +++ b/includes/Import.php @@ -429,53 +429,12 @@ class WikiImporter { return ''; } - # -------------- - - /** Left in for debugging */ - private function dumpElement() { - static $lookup = null; - if ( !$lookup ) { - $xmlReaderConstants = array( - "NONE", - "ELEMENT", - "ATTRIBUTE", - "TEXT", - "CDATA", - "ENTITY_REF", - "ENTITY", - "PI", - "COMMENT", - "DOC", - "DOC_TYPE", - "DOC_FRAGMENT", - "NOTATION", - "WHITESPACE", - "SIGNIFICANT_WHITESPACE", - "END_ELEMENT", - "END_ENTITY", - "XML_DECLARATION", - ); - $lookup = array(); - - foreach ( $xmlReaderConstants as $name ) { - $lookup[constant( "XmlReader::$name" )] = $name; - } - } - - print var_dump( - $lookup[$this->reader->nodeType], - $this->reader->name, - $this->reader->value - ) . "\n\n"; - } - /** * Primary entry point * @throws MWException * @return bool */ public function doImport() { - // Calls to reader->read need to be wrapped in calls to // libxml_disable_entity_loader() to avoid local file // inclusion attacks (bug 46932).