XMLReader#name gives the qualified name, which was not a good thing to use.
Bug: T6520
Change-Id: I8174fe64791f0e8d0c6677169595201446eab583
$oldDisable = libxml_disable_entity_loader( true );
$this->reader->read();
$oldDisable = libxml_disable_entity_loader( true );
$this->reader->read();
- if ( $this->reader->name != 'mediawiki' ) {
+ if ( $this->reader->localName != 'mediawiki' ) {
libxml_disable_entity_loader( $oldDisable );
throw new MWException( "Expected <mediawiki> tag, got " .
libxml_disable_entity_loader( $oldDisable );
throw new MWException( "Expected <mediawiki> tag, got " .
+ $this->reader->localName );
}
$this->debug( "<mediawiki> tag is correct." );
}
$this->debug( "<mediawiki> tag is correct." );
$rethrow = null;
try {
while ( $keepReading ) {
$rethrow = null;
try {
while ( $keepReading ) {
- $tag = $this->reader->name;
+ $tag = $this->reader->localName;
$type = $this->reader->nodeType;
if ( !Hooks::run( 'ImportHandleToplevelXMLTag', array( $this ) ) ) {
$type = $this->reader->nodeType;
if ( !Hooks::run( 'ImportHandleToplevelXMLTag', array( $this ) ) ) {
while ( $this->reader->read() ) {
if ( $this->reader->nodeType == XmlReader::END_ELEMENT &&
while ( $this->reader->read() ) {
if ( $this->reader->nodeType == XmlReader::END_ELEMENT &&
- $this->reader->name == 'siteinfo' ) {
+ $this->reader->localName == 'siteinfo' ) {
- $tag = $this->reader->name;
+ $tag = $this->reader->localName;
if ( $tag == 'namespace' ) {
$this->foreignNamespaces[ $this->nodeAttribute( 'key' ) ] =
if ( $tag == 'namespace' ) {
$this->foreignNamespaces[ $this->nodeAttribute( 'key' ) ] =
while ( $this->reader->read() ) {
if ( $this->reader->nodeType == XMLReader::END_ELEMENT &&
while ( $this->reader->read() ) {
if ( $this->reader->nodeType == XMLReader::END_ELEMENT &&
- $this->reader->name == 'logitem' ) {
+ $this->reader->localName == 'logitem' ) {
- $tag = $this->reader->name;
+ $tag = $this->reader->localName;
if ( !Hooks::run( 'ImportHandleLogItemXMLTag', array(
$this, $logInfo
if ( !Hooks::run( 'ImportHandleLogItemXMLTag', array(
$this, $logInfo
while ( $skip ? $this->reader->next() : $this->reader->read() ) {
if ( $this->reader->nodeType == XMLReader::END_ELEMENT &&
while ( $skip ? $this->reader->next() : $this->reader->read() ) {
if ( $this->reader->nodeType == XMLReader::END_ELEMENT &&
- $this->reader->name == 'page' ) {
+ $this->reader->localName == 'page' ) {
- $tag = $this->reader->name;
+ $tag = $this->reader->localName;
if ( $badTitle ) {
// The title is invalid, bail out of this page
if ( $badTitle ) {
// The title is invalid, bail out of this page
while ( $skip ? $this->reader->next() : $this->reader->read() ) {
if ( $this->reader->nodeType == XMLReader::END_ELEMENT &&
while ( $skip ? $this->reader->next() : $this->reader->read() ) {
if ( $this->reader->nodeType == XMLReader::END_ELEMENT &&
- $this->reader->name == 'revision' ) {
+ $this->reader->localName == 'revision' ) {
- $tag = $this->reader->name;
+ $tag = $this->reader->localName;
if ( !Hooks::run( 'ImportHandleRevisionXMLTag', array(
$this, $pageInfo, $revisionInfo
if ( !Hooks::run( 'ImportHandleRevisionXMLTag', array(
$this, $pageInfo, $revisionInfo
while ( $skip ? $this->reader->next() : $this->reader->read() ) {
if ( $this->reader->nodeType == XMLReader::END_ELEMENT &&
while ( $skip ? $this->reader->next() : $this->reader->read() ) {
if ( $this->reader->nodeType == XMLReader::END_ELEMENT &&
- $this->reader->name == 'upload' ) {
+ $this->reader->localName == 'upload' ) {
- $tag = $this->reader->name;
+ $tag = $this->reader->localName;
if ( !Hooks::run( 'ImportHandleUploadXMLTag', array(
$this, $pageInfo
if ( !Hooks::run( 'ImportHandleUploadXMLTag', array(
$this, $pageInfo
while ( $this->reader->read() ) {
if ( $this->reader->nodeType == XMLReader::END_ELEMENT &&
while ( $this->reader->read() ) {
if ( $this->reader->nodeType == XMLReader::END_ELEMENT &&
- $this->reader->name == 'contributor' ) {
+ $this->reader->localName == 'contributor' ) {
- $tag = $this->reader->name;
+ $tag = $this->reader->localName;
if ( in_array( $tag, $fields ) ) {
$info[$tag] = $this->nodeContents();
if ( in_array( $tag, $fields ) ) {
$info[$tag] = $this->nodeContents();