}
$buffer = "";
while ( $this->reader->read() ) {
- switch( $this->reader->nodeType ) {
+ switch ( $this->reader->nodeType ) {
case XmlReader::TEXT:
case XmlReader::SIGNIFICANT_WHITESPACE:
$buffer .= $this->reader->value;
$lookup = array();
foreach ( $xmlReaderConstants as $name ) {
- $lookup[constant("XmlReader::$name")] = $name;
+ $lookup[constant( "XmlReader::$name" )] = $name;
}
}
- print( var_dump(
+ print var_dump(
$lookup[$this->reader->nodeType],
$this->reader->name,
$this->reader->value
- ) . "\n\n" );
+ ) . "\n\n";
}
/**
$tag = $this->reader->name;
$type = $this->reader->nodeType;
- if ( !wfRunHooks( 'ImportHandleToplevelXMLTag', $this ) ) {
+ if ( !wfRunHooks( 'ImportHandleToplevelXMLTag', array( $this ) ) ) {
// Do nothing
} elseif ( $tag == 'mediawiki' && $type == XmlReader::END_ELEMENT ) {
break;
$tag = $this->reader->name;
- if ( !wfRunHooks( 'ImportHandleLogItemXMLTag',
- $this, $logInfo ) ) {
+ if ( !wfRunHooks( 'ImportHandleLogItemXMLTag', array(
+ $this, $logInfo
+ ) ) ) {
// Do nothing
} elseif ( in_array( $tag, $normalFields ) ) {
$logInfo[$tag] = $this->nodeContents();
$tag = $this->reader->name;
- if ( !wfRunHooks( 'ImportHandleRevisionXMLTag', $this,
- $pageInfo, $revisionInfo ) ) {
+ if ( !wfRunHooks( 'ImportHandleRevisionXMLTag', array(
+ $this, $pageInfo, $revisionInfo
+ ) ) ) {
// Do nothing
} elseif ( in_array( $tag, $normalFields ) ) {
$revisionInfo[$tag] = $this->nodeContents();
$tag = $this->reader->name;
- if ( !wfRunHooks( 'ImportHandleUploadXMLTag', $this,
- $pageInfo ) ) {
+ if ( !wfRunHooks( 'ImportHandleUploadXMLTag', array(
+ $this, $pageInfo
+ ) ) ) {
// Do nothing
} elseif ( in_array( $tag, $normalFields ) ) {
$uploadInfo[$tag] = $this->nodeContents();
}
$buffer = "";
while ( $this->read() ) {
- switch( $this->nodeType ) {
+ switch ( $this->nodeType ) {
case XmlReader::TEXT:
case XmlReader::SIGNIFICANT_WHITESPACE:
$buffer .= $this->value;
return Status::newFatal( 'importnofile' );
}
if ( !empty( $upload['error'] ) ) {
- switch( $upload['error'] ) {
+ switch ( $upload['error'] ) {
case 1: # The uploaded file exceeds the upload_max_filesize directive in php.ini.
return Status::newFatal( 'importuploaderrorsize' );
case 2: # The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form.