(bug 38190) Add "required" flag to some token params
[lhc/web/wiklou.git] / includes / api / ApiPatrol.php
index 1332f26..cb5e081 100644 (file)
@@ -65,7 +65,10 @@ class ApiPatrol extends ApiBase {
 
        public function getAllowedParams() {
                return array(
-                       'token' => null,
+                       'token' => array(
+                               ApiBase::PARAM_TYPE => 'string',
+                               ApiBase::PARAM_REQUIRED => true
+                       ),
                        'rcid' => array(
                                ApiBase::PARAM_TYPE => 'integer',
                                ApiBase::PARAM_REQUIRED => true
@@ -80,6 +83,16 @@ class ApiPatrol extends ApiBase {
                );
        }
 
+       public function getResultProperties() {
+               return array(
+                       '' => array(
+                               'rcid' => 'integer',
+                               'ns' => 'namespace',
+                               'title' => 'string'
+                       )
+               );
+       }
+
        public function getDescription() {
                return 'Patrol a page or revision';
        }