<?php
+/**
+ * XML file reader for the page data importer
+ *
+ * @file
+ */
+
/**
* implements Special:Import
* @ingroup SpecialPage
* Notify the callback function when a </page> is closed.
* @param $title Title
* @param $origTitle Title
- * @param $revisionCount int
- * @param $successCount Int: number of revisions for which callback returned true
+ * @param $revCount Integer
+ * @param $sucCount Int: number of revisions for which callback returned true
+ * @param $pageInfo Array: associative array of page information
*/
private function pageOutCallback( $title, $origTitle, $revCount, $sucCount, $pageInfo ) {
if( isset( $this->mPageOutCallback ) ) {
private function processTitle( $text ) {
$workTitle = $text;
$origTitle = Title::newFromText( $workTitle );
- $title = null;
if( !is_null( $this->mTargetNamespace ) && !is_null( $origTitle ) ) {
$title = Title::makeTitle( $this->mTargetNamespace,
if( is_null( $title ) ) {
// Invalid page title? Ignore the page
$this->notice( "Skipping invalid page title '$workTitle'" );
+ return false;
} elseif( $title->getInterwiki() != '' ) {
$this->notice( "Skipping interwiki page title '$workTitle'" );
- $title = null;
+ return false;
}
return array( $origTitle, $title );