Merge "Fix regression in API log events (bug 35635)"
[lhc/web/wiklou.git] / includes / api / ApiQueryCategoryMembers.php
index 82c28f4..55ce023 100644 (file)
@@ -4,7 +4,7 @@
  *
  * Created on June 14, 2007
  *
- * Copyright © 2006 Yuri Astrakhan <Firstname><Lastname>@gmail.com
+ * Copyright © 2006 Yuri Astrakhan "<Firstname><Lastname>@gmail.com"
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -97,7 +97,7 @@ class ApiQueryCategoryMembers extends ApiQueryGeneratorBase {
                $dir = in_array( $params['dir'], array( 'asc', 'ascending', 'newer' ) ) ? 'newer' : 'older';
 
                if ( $params['sort'] == 'timestamp' ) {
-                       $this->addWhereRange( 'cl_timestamp',
+                       $this->addTimestampWhereRange( 'cl_timestamp',
                                $dir,
                                $params['start'],
                                $params['end'] );
@@ -349,7 +349,7 @@ class ApiQueryCategoryMembers extends ApiQueryGeneratorBase {
                        'endsortkey' => "Sortkey to end listing at. Must be given in binary format. Can only be used with {$p}sort=sortkey",
                        'startsortkeyprefix' => "Sortkey prefix to start listing from. Can only be used with {$p}sort=sortkey. Overrides {$p}startsortkey",
                        'endsortkeyprefix' => "Sortkey prefix to end listing BEFORE (not at, if this value occurs it will not be included!). Can only be used with {$p}sort=sortkey. Overrides {$p}endsortkey",
-                       'continue' => 'For large categories, give the value retured from previous query',
+                       'continue' => 'For large categories, give the value returned from previous query',
                        'limit' => 'The maximum number of pages to return.',
                );
 
@@ -364,6 +364,36 @@ class ApiQueryCategoryMembers extends ApiQueryGeneratorBase {
                return $desc;
        }
 
+       public function getResultProperties() {
+               return array(
+                       'ids' => array(
+                               'pageid' => 'integer'
+                       ),
+                       'title' => array(
+                               'ns' => 'namespace',
+                               'title' => 'string'
+                       ),
+                       'sortkey' => array(
+                               'sortkey' => 'string'
+                       ),
+                       'sortkeyprefix' => array(
+                               'sortkeyprefix' => 'string'
+                       ),
+                       'type' => array(
+                               'type' => array(
+                                       ApiBase::PROP_TYPE => array(
+                                               'page',
+                                               'subcat',
+                                               'file'
+                                       )
+                               )
+                       ),
+                       'timestamp' => array(
+                               'timestamp' => 'timestamp'
+                       )
+               );
+       }
+
        public function getDescription() {
                return 'List all pages in a given category';
        }