Fix bug 26570 (user CSS preview broken) and bug 26555 (styles added with $out->addSty...
[lhc/web/wiklou.git] / includes / ImportXMLReader.php
index 36de45a..e221eac 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+/**
+ * XML file reader for the page data importer
+ *
+ * @file
+ */
+
 /**
  * implements Special:Import
  * @ingroup SpecialPage
@@ -209,8 +215,9 @@ class WikiImporter {
         * 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 ) ) {
@@ -601,7 +608,6 @@ class WikiImporter {
        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,
@@ -613,9 +619,10 @@ class WikiImporter {
                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 );