Merge "Added some extra tests for ORMRow class"
[lhc/web/wiklou.git] / includes / api / ApiImport.php
index 5093b6b..6663d97 100644 (file)
@@ -126,6 +126,17 @@ class ApiImport extends ApiBase {
                );
        }
 
+       public function getResultProperties() {
+               return array(
+                       ApiBase::PROP_LIST => true,
+                       '' => array(
+                               'ns' => 'namespace',
+                               'title' => 'string',
+                               'revisions' => 'integer'
+                       )
+               );
+       }
+
        public function getDescription() {
                return array(
                        'Import a page from another wiki, or an XML file.' ,
@@ -187,11 +198,11 @@ class ApiImportReporter extends ImportReporter {
                // Add a result entry
                $r = array();
 
-               if ( $title === null ) {\r
+               if ( $title === null ) {
                        # Invalid or non-importable title
                        $r['title'] = $pageInfo['title'];
-                       $r['invalid'] = '';\r
-               } else {\r
+                       $r['invalid'] = '';
+               } else {
                        ApiQueryBase::addTitleInfo( $r, $title );
                        $r['revisions'] = intval( $successCount );
                }