Merge "Updated result properties in paraminfo API"
authorAaron Schulz <aschulz@wikimedia.org>
Sat, 21 Jul 2012 09:09:02 +0000 (09:09 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Sat, 21 Jul 2012 09:09:02 +0000 (09:09 +0000)
1  2 
includes/api/ApiDelete.php
includes/api/ApiQueryUserContributions.php

@@@ -4,7 -4,7 +4,7 @@@
   *
   * Created on Jun 30, 2007
   *
 - * Copyright © 2007 Roan Kattouw <Firstname>.<Lastname>@gmail.com
 + * Copyright © 2007 Roan Kattouw "<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
@@@ -52,7 -52,7 +52,7 @@@ class ApiDelete extends ApiBase 
                }
  
                $titleObj = $pageObj->getTitle();
 -              $reason = ( isset( $params['reason'] ) ? $params['reason'] : null );
 +              $reason = $params['reason'];
                $user = $this->getUser();
  
                if ( $titleObj->getNamespace() == NS_FILE ) {
@@@ -62,7 -62,7 +62,7 @@@
                }
  
                if ( !$status->isGood() ) {
 -                      $errors = $this->getErrorsArray();
 +                      $errors = $status->getErrorsArray();
                        $this->dieUsageMsg( $errors[0] ); // We don't care about multiple errors, just report one of them
                }
  
                        'pageid' => array(
                                ApiBase::PARAM_TYPE => 'integer'
                        ),
 -                      'token' => null,
 +                      'token' => array(
 +                              ApiBase::PARAM_TYPE => 'string',
 +                              ApiBase::PARAM_REQUIRED => true
 +                      ),
                        'reason' => null,
                        'watch' => array(
                                ApiBase::PARAM_DFLT => false,
                return array(
                        '' => array(
                                'title' => 'string',
-                               'reason' => 'string'
+                               'reason' => 'string',
+                               'logid' => 'integer'
                        )
                );
        }
@@@ -4,7 -4,7 +4,7 @@@
   *
   * Created on Oct 16, 2006
   *
 - * 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
@@@ -256,7 -256,7 +256,7 @@@ class ApiQueryContributions extends Api
                $this->addFieldsIf( 'page_latest', $this->fld_flags );
                // $this->addFieldsIf( 'rev_text_id', $this->fld_ids ); // Should this field be exposed?
                $this->addFieldsIf( 'rev_comment', $this->fld_comment || $this->fld_parsedcomment );
 -              $this->addFieldsIf( 'rev_len', $this->fld_size );
 +              $this->addFieldsIf( 'rev_len', $this->fld_size || $this->fld_sizediff );
                $this->addFieldsIf( 'rev_minor_edit', $this->fld_flags );
                $this->addFieldsIf( 'rev_parent_id', $this->fld_flags || $this->fld_sizediff );
                $this->addFieldsIf( 'rc_patrolled', $this->fld_patrolled );
                                        ApiBase::PROP_TYPE => 'integer',
                                        ApiBase::PROP_NULLABLE => true
                                )
+                       ),
+                       'sizediff' => array(
+                               'sizediff' => array(
+                                       ApiBase::PROP_TYPE => 'integer',
+                                       ApiBase::PROP_NULLABLE => true
+                               )
                        )
                );
        }