r70462 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r70461‎ | r70462 | r70463 >
Date:14:29, 4 August 2010
Author:soxred93
Status:ok
Tags:
Comment:
Followup to r70460 and r70461: Use true instead of 1
Modified paths:
  • /trunk/phase3/includes/api/ApiBlock.php (modified) (history)
  • /trunk/phase3/includes/api/ApiEditPage.php (modified) (history)
  • /trunk/phase3/includes/api/ApiEmailUser.php (modified) (history)
  • /trunk/phase3/includes/api/ApiMove.php (modified) (history)
  • /trunk/phase3/includes/api/ApiPatrol.php (modified) (history)
  • /trunk/phase3/includes/api/ApiProtect.php (modified) (history)
  • /trunk/phase3/includes/api/ApiPurge.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryBacklinks.php (modified) (history)
  • /trunk/phase3/includes/api/ApiRollback.php (modified) (history)
  • /trunk/phase3/includes/api/ApiUndelete.php (modified) (history)
  • /trunk/phase3/includes/api/ApiUpload.php (modified) (history)
  • /trunk/phase3/includes/api/ApiUserrights.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiMove.php
@@ -171,7 +171,7 @@
172172 ),
173173 'to' => array(
174174 ApiBase::PARAM_TYPE => 'string',
175 - ApiBase::PARAM_REQUIRED => 1
 175+ ApiBase::PARAM_REQUIRED => true
176176 ),
177177 'token' => null,
178178 'reason' => null,
Index: trunk/phase3/includes/api/ApiProtect.php
@@ -145,12 +145,12 @@
146146 return array(
147147 'title' => array(
148148 ApiBase::PARAM_TYPE => 'string',
149 - ApiBase::PARAM_REQUIRED => 1
 149+ ApiBase::PARAM_REQUIRED => true
150150 ),
151151 'token' => null,
152152 'protections' => array(
153153 ApiBase::PARAM_ISMULTI => true,
154 - ApiBase::PARAM_REQUIRED => 1,
 154+ ApiBase::PARAM_REQUIRED => true,
155155 ),
156156 'expiry' => array(
157157 ApiBase::PARAM_ISMULTI => true,
Index: trunk/phase3/includes/api/ApiPurge.php
@@ -84,7 +84,7 @@
8585 return array(
8686 'titles' => array(
8787 ApiBase::PARAM_ISMULTI => true,
88 - ApiBase::PARAM_REQUIRED => 1
 88+ ApiBase::PARAM_REQUIRED => true
8989 )
9090 );
9191 }
Index: trunk/phase3/includes/api/ApiQueryBacklinks.php
@@ -404,7 +404,7 @@
405405 $retval = array(
406406 'title' => array(
407407 ApiBase::PARAM_TYPE => 'string',
408 - ApiBase::PARAM_REQUIRED => 1
 408+ ApiBase::PARAM_REQUIRED => true
409409 ),
410410 'continue' => null,
411411 'namespace' => array(
Index: trunk/phase3/includes/api/ApiRollback.php
@@ -79,11 +79,11 @@
8080 return array(
8181 'title' => array(
8282 ApiBase::PARAM_TYPE => 'string',
83 - ApiBase::PARAM_REQUIRED => 1
 83+ ApiBase::PARAM_REQUIRED => true
8484 ),
8585 'user' => array(
8686 ApiBase::PARAM_TYPE => 'string',
87 - ApiBase::PARAM_REQUIRED => 1
 87+ ApiBase::PARAM_REQUIRED => true
8888 ),
8989 'token' => null,
9090 'summary' => null,
Index: trunk/phase3/includes/api/ApiUserrights.php
@@ -87,7 +87,7 @@
8888 return array (
8989 'user' => array(
9090 ApiBase::PARAM_TYPE => 'string',
91 - ApiBase::PARAM_REQUIRED => 1
 91+ ApiBase::PARAM_REQUIRED => true
9292 ),
9393 'add' => array(
9494 ApiBase::PARAM_TYPE => User::getAllGroups(),
Index: trunk/phase3/includes/api/ApiEditPage.php
@@ -386,7 +386,7 @@
387387 return array(
388388 'title' => array(
389389 ApiBase::PARAM_TYPE => 'string',
390 - ApiBase::PARAM_REQUIRED => 1
 390+ ApiBase::PARAM_REQUIRED => true
391391 ),
392392 'section' => null,
393393 'text' => null,
Index: trunk/phase3/includes/api/ApiEmailUser.php
@@ -85,12 +85,12 @@
8686 return array(
8787 'target' => array(
8888 ApiBase::PARAM_TYPE => 'string',
89 - ApiBase::PARAM_REQUIRED => 1
 89+ ApiBase::PARAM_REQUIRED => true
9090 ),
9191 'subject' => null,
9292 'text' => array(
9393 ApiBase::PARAM_TYPE => 'string',
94 - ApiBase::PARAM_REQUIRED => 1
 94+ ApiBase::PARAM_REQUIRED => true
9595 ),
9696 'token' => null,
9797 'ccme' => false,
Index: trunk/phase3/includes/api/ApiBlock.php
@@ -134,7 +134,7 @@
135135 return array(
136136 'user' => array(
137137 ApiBase::PARAM_TYPE => 'string',
138 - ApiBase::PARAM_REQUIRED => 1
 138+ ApiBase::PARAM_REQUIRED => true
139139 ),
140140 'token' => null,
141141 'gettoken' => false,
Index: trunk/phase3/includes/api/ApiPatrol.php
@@ -67,7 +67,7 @@
6868 'token' => null,
6969 'rcid' => array(
7070 ApiBase::PARAM_TYPE => 'integer',
71 - ApiBase::PARAM_REQUIRED => 1
 71+ ApiBase::PARAM_REQUIRED => true
7272 ),
7373 );
7474 }
Index: trunk/phase3/includes/api/ApiUndelete.php
@@ -100,7 +100,7 @@
101101 return array(
102102 'title' => array(
103103 ApiBase::PARAM_TYPE => 'string',
104 - ApiBase::PARAM_REQUIRED => 1
 104+ ApiBase::PARAM_REQUIRED => true
105105 ),
106106 'token' => null,
107107 'reason' => '',
Index: trunk/phase3/includes/api/ApiUpload.php
@@ -316,7 +316,7 @@
317317 $params = array(
318318 'filename' => array(
319319 ApiBase::PARAM_TYPE => 'string',
320 - ApiBase::PARAM_REQUIRED => 1
 320+ ApiBase::PARAM_REQUIRED => true
321321 ),
322322 'comment' => array(
323323 ApiBase::PARAM_DFLT => ''

Follow-up revisions

RevisionCommit summaryAuthorDate
r734691.16wmf4: Merging PARAM_REQUIRED support from trunk for upcoming ArticleAsses...catrope18:53, 21 September 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r70460* PARAM_REQUIRED parameter flag added. If this flag is set, and the end user ...soxred9313:35, 4 August 2010
r70461Followup to r70460: Committed wrong version of ApiBase.php, convert all core ...soxred9314:15, 4 August 2010

Status & tagging log