Addshore has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/234419

Change subject: Only allow certain TODO params in API
......................................................................

Only allow certain TODO params in API

This also means that users of the api
will get 'nice' error message if they try
to use the wrong param...

Change-Id: I5bbe50ec841dbd0e539fe4d7174f07e49dc32beb
---
M includes/api/ApiNewsletter.php
M includes/api/ApiNewsletterManage.php
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Newsletter 
refs/changes/19/234419/1

diff --git a/includes/api/ApiNewsletter.php b/includes/api/ApiNewsletter.php
index 9f52bc7..dbe6679 100644
--- a/includes/api/ApiNewsletter.php
+++ b/includes/api/ApiNewsletter.php
@@ -36,7 +36,7 @@
                                        ApiBase::PARAM_REQUIRED => true,
                                ),
                                'todo' => array(
-                                       ApiBase::PARAM_TYPE => 'string',
+                                       ApiBase::PARAM_TYPE => array( 
'subscribe', 'unsubscribe' ),
                                        ApiBase::PARAM_REQUIRED => true,
                                ),
                        )
diff --git a/includes/api/ApiNewsletterManage.php 
b/includes/api/ApiNewsletterManage.php
index edfbeaf..2c10f8c 100644
--- a/includes/api/ApiNewsletterManage.php
+++ b/includes/api/ApiNewsletterManage.php
@@ -34,7 +34,7 @@
                                        ApiBase::PARAM_REQUIRED => true,
                                ),
                                'todo' => array(
-                                       ApiBase::PARAM_TYPE => 'string',
+                                       ApiBase::PARAM_TYPE => array( 
'removepublisher' ),
                                        ApiBase::PARAM_REQUIRED => true,
                                ),
                                'publisher' => array(

-- 
To view, visit https://gerrit.wikimedia.org/r/234419
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5bbe50ec841dbd0e539fe4d7174f07e49dc32beb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Newsletter
Gerrit-Branch: master
Gerrit-Owner: Addshore <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to