Add parser method to call parser functions
[lhc/web/wiklou.git] / includes / Import.php
index cc642e4..fee636f 100644 (file)
@@ -225,7 +225,7 @@ class WikiImporter {
                                } else {
                                        // set namespace to 'all', so the namespace check in processTitle() can passed
                                        $this->setTargetNamespace( null );
-                                       $this->mTargetRootPage = $title->getPrefixedDBKey();
+                                       $this->mTargetRootPage = $title->getPrefixedDBkey();
                                }
                        }
                }
@@ -330,8 +330,8 @@ class WikiImporter {
         * @param $title Title
         * @param $origTitle Title
         * @param $revCount Integer
-        * @param $sucCount Int: number of revisions for which callback returned true
-        * @param $pageInfo Array: associative array of page information
+        * @param int $sucCount number of revisions for which callback returned true
+        * @param array $pageInfo associative array of page information
         */
        private function pageOutCallback( $title, $origTitle, $revCount, $sucCount, $pageInfo ) {
                if( isset( $this->mPageOutCallback ) ) {
@@ -509,7 +509,7 @@ class WikiImporter {
 
                while ( $this->reader->read() ) {
                        if ( $this->reader->nodeType == XmlReader::END_ELEMENT &&
-                                       $this->reader->name == 'logitem') {
+                                       $this->reader->name == 'logitem' ) {
                                break;
                        }
 
@@ -572,7 +572,7 @@ class WikiImporter {
 
                while ( $skip ? $this->reader->next() : $this->reader->read() ) {
                        if ( $this->reader->nodeType == XmlReader::END_ELEMENT &&
-                                       $this->reader->name == 'page') {
+                                       $this->reader->name == 'page' ) {
                                break;
                        }
 
@@ -626,7 +626,7 @@ class WikiImporter {
 
                while ( $skip ? $this->reader->next() : $this->reader->read() ) {
                        if ( $this->reader->nodeType == XmlReader::END_ELEMENT &&
-                                       $this->reader->name == 'revision') {
+                                       $this->reader->name == 'revision' ) {
                                break;
                        }
 
@@ -712,7 +712,7 @@ class WikiImporter {
 
                while ( $skip ? $this->reader->next() : $this->reader->read() ) {
                        if ( $this->reader->nodeType == XmlReader::END_ELEMENT &&
-                                       $this->reader->name == 'upload') {
+                                       $this->reader->name == 'upload' ) {
                                break;
                        }
 
@@ -809,7 +809,7 @@ class WikiImporter {
 
                while ( $this->reader->read() ) {
                        if ( $this->reader->nodeType == XmlReader::END_ELEMENT &&
-                                       $this->reader->name == 'contributor') {
+                                       $this->reader->name == 'contributor' ) {
                                break;
                        }
 
@@ -1531,7 +1531,7 @@ class WikiRevision {
                }
 
                if ( $status->isGood() ) {
-                       wfDebug( __METHOD__ . ": Succesful\n" );
+                       wfDebug( __METHOD__ . ": Successful\n" );
                        return true;
                } else {
                        wfDebug( __METHOD__ . ': failed: ' . $status->getXml() . "\n" );
@@ -1646,7 +1646,7 @@ class ImportStreamSource {
        static function newFromUpload( $fieldname = "xmlimport" ) {
                $upload =& $_FILES[$fieldname];
 
-               if( !isset( $upload ) || !$upload['name'] ) {
+               if( $upload === null || !$upload['name'] ) {
                        return Status::newFatal( 'importnofile' );
                }
                if( !empty( $upload['error'] ) ) {