From 6601c36bf891ead9bebdba50b81ff99c32e4d00c Mon Sep 17 00:00:00 2001 From: Petr Onderka Date: Sat, 7 Jul 2012 15:16:56 +0200 Subject: [PATCH] Retrieve rev_len for sizediff in usercontributions API The sizediff parameter introduced in I6e388e75 requires the rev_len field, but it wasn't added to the condition for that field. This means prop=size|sizediff worked, but prop=sizediff alone didn't. This patch fixes that. Change-Id: Ib15814d809398ca3d4633149af0ce62489d8adaa --- includes/api/ApiQueryUserContributions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/api/ApiQueryUserContributions.php b/includes/api/ApiQueryUserContributions.php index f5319802a4..4161dd7877 100644 --- a/includes/api/ApiQueryUserContributions.php +++ b/includes/api/ApiQueryUserContributions.php @@ -256,7 +256,7 @@ class ApiQueryContributions extends ApiQueryBase { $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 ); -- 2.20.1