Merge "(bug 38152) jquery.tablesorter: Use .data() instead of .attr()"
[lhc/web/wiklou.git] / includes / api / ApiQueryRecentChanges.php
index 2d2d9ff..62c6678 100644 (file)
@@ -144,7 +144,7 @@ class ApiQueryRecentChanges extends ApiQueryGeneratorBase {
                /* Build our basic query. Namely, something along the lines of:
                 * SELECT * FROM recentchanges WHERE rc_timestamp > $start
                 *              AND rc_timestamp < $end AND rc_namespace = $namespace
-                *              AND rc_deleted = '0'
+                *              AND rc_deleted = 0
                 */
                $this->addTables( 'recentchanges' );
                $index = array( 'recentchanges' => 'rc_timestamp' ); // May change
@@ -629,6 +629,97 @@ class ApiQueryRecentChanges extends ApiQueryGeneratorBase {
                );
        }
 
+       public function getResultProperties() {
+               global $wgLogTypes;
+               $props = array(
+                       '' => array(
+                               'type' => array(
+                                       ApiBase::PROP_TYPE => array(
+                                               'edit',
+                                               'new',
+                                               'move',
+                                               'log',
+                                               'move over redirect'
+                                       )
+                               )
+                       ),
+                       'title' => array(
+                               'ns' => 'namespace',
+                               'title' => 'string',
+                               'new_ns' => array(
+                                       ApiBase::PROP_TYPE => 'namespace',
+                                       ApiBase::PROP_NULLABLE => true
+                               ),
+                               'new_title' => array(
+                                       ApiBase::PROP_TYPE => 'string',
+                                       ApiBase::PROP_NULLABLE => true
+                               )
+                       ),
+                       'ids' => array(
+                               'rcid' => 'integer',
+                               'pageid' => 'integer',
+                               'revid' => 'integer',
+                               'old_revid' => 'integer'
+                       ),
+                       'user' => array(
+                               'user' => 'string',
+                               'anon' => 'boolean'
+                       ),
+                       'userid' => array(
+                               'userid' => 'integer',
+                               'anon' => 'boolean'
+                       ),
+                       'flags' => array(
+                               'bot' => 'boolean',
+                               'new' => 'boolean',
+                               'minor' => 'boolean'
+                       ),
+                       'sizes' => array(
+                               'oldlen' => 'integer',
+                               'newlen' => 'integer'
+                       ),
+                       'timestamp' => array(
+                               'timestamp' => 'timestamp'
+                       ),
+                       'comment' => array(
+                               'comment' => array(
+                                       ApiBase::PROP_TYPE => 'string',
+                                       ApiBase::PROP_NULLABLE => true
+                               )
+                       ),
+                       'parsedcomment' => array(
+                               'parsedcomment' => array(
+                                       ApiBase::PROP_TYPE => 'string',
+                                       ApiBase::PROP_NULLABLE => true
+                               )
+                       ),
+                       'redirect' => array(
+                               'redirect' => 'boolean'
+                       ),
+                       'patrolled' => array(
+                               'patrolled' => 'boolean'
+                       ),
+                       'loginfo' => array(
+                               'logid' => array(
+                                       ApiBase::PROP_TYPE => 'integer',
+                                       ApiBase::PROP_NULLABLE => true
+                               ),
+                               'logtype' => array(
+                                       ApiBase::PROP_TYPE => $wgLogTypes,
+                                       ApiBase::PROP_NULLABLE => true
+                               ),
+                               'logaction' => array(
+                                       ApiBase::PROP_TYPE => 'string',
+                                       ApiBase::PROP_NULLABLE => true
+                               )
+                       )
+               );
+
+               self::addTokenProperties( $props, $this->getTokenFunctions() );
+
+               return $props;
+       }
+
        public function getDescription() {
                return 'Enumerate recent changes';
        }