Index: trunk/extensions/Survey/api/ApiDeleteSurvey.php |
— | — | @@ -41,6 +41,14 @@ |
42 | 42 | ); |
43 | 43 | } |
44 | 44 | |
| 45 | + public function needsToken() { |
| 46 | + return true; |
| 47 | + } |
| 48 | + |
| 49 | + public function getTokenSalt() { |
| 50 | + return ''; |
| 51 | + } |
| 52 | + |
45 | 53 | public function getAllowedParams() { |
46 | 54 | return array( |
47 | 55 | 'ids' => array( |
— | — | @@ -48,12 +56,14 @@ |
49 | 57 | ApiBase::PARAM_REQUIRED => true, |
50 | 58 | ApiBase::PARAM_ISMULTI => true, |
51 | 59 | ), |
| 60 | + 'token' => null, |
52 | 61 | ); |
53 | 62 | } |
54 | 63 | |
55 | 64 | public function getParamDescription() { |
56 | 65 | return array( |
57 | | - 'ids' => 'The IDs of the surveys to delete' |
| 66 | + 'ids' => 'The IDs of the surveys to delete', |
| 67 | + 'token' => 'Edit token. You can get one of these through prop=info.', |
58 | 68 | ); |
59 | 69 | } |
60 | 70 | |
Index: trunk/extensions/Survey/api/ApiSubmitSurvey.php |
— | — | @@ -44,6 +44,14 @@ |
45 | 45 | $submission = new SurveySubmission(); |
46 | 46 | } |
47 | 47 | |
| 48 | + public function needsToken() { |
| 49 | + return true; |
| 50 | + } |
| 51 | + |
| 52 | + public function getTokenSalt() { |
| 53 | + return ''; |
| 54 | + } |
| 55 | + |
48 | 56 | public function getAllowedParams() { |
49 | 57 | return array( |
50 | 58 | 'id' => array( |
— | — | @@ -52,11 +60,15 @@ |
53 | 61 | 'name' => array( |
54 | 62 | ApiBase::PARAM_TYPE => 'string', |
55 | 63 | ), |
| 64 | + 'token' => null, |
56 | 65 | ); |
57 | 66 | } |
58 | 67 | |
59 | 68 | public function getParamDescription() { |
60 | 69 | return array( |
| 70 | + 'id' => 'The ID of the survey being submitted.', |
| 71 | + 'name' => 'The name of the survey being submitted.', |
| 72 | + 'token' => 'Edit token. You can get one of these through prop=info.', |
61 | 73 | ); |
62 | 74 | } |
63 | 75 | |
Index: trunk/extensions/Survey/api/ApiEditSurvey.php |
— | — | @@ -60,6 +60,14 @@ |
61 | 61 | $survey->getName() |
62 | 62 | ); |
63 | 63 | } |
| 64 | + |
| 65 | + public function needsToken() { |
| 66 | + return true; |
| 67 | + } |
| 68 | + |
| 69 | + public function getTokenSalt() { |
| 70 | + return ''; |
| 71 | + } |
64 | 72 | |
65 | 73 | public function getAllowedParams() { |
66 | 74 | return array( |
— | — | @@ -80,6 +88,7 @@ |
81 | 89 | ApiBase::PARAM_ISMULTI => true, |
82 | 90 | ApiBase::PARAM_REQUIRED => true, |
83 | 91 | ), |
| 92 | + 'token' => null, |
84 | 93 | ); |
85 | 94 | } |
86 | 95 | |
— | — | @@ -89,6 +98,7 @@ |
90 | 99 | 'name' => 'The name of the survey', |
91 | 100 | 'enabled' => 'Enable the survey or not', |
92 | 101 | 'questions' => 'The questions that make up the survey', |
| 102 | + 'token' => 'Edit token. You can get one of these through prop=info.', |
93 | 103 | ); |
94 | 104 | } |
95 | 105 | |
Index: trunk/extensions/Survey/api/ApiAddSurvey.php |
— | — | @@ -68,6 +68,14 @@ |
69 | 69 | $survey->getName() |
70 | 70 | ); |
71 | 71 | } |
| 72 | + |
| 73 | + public function needsToken() { |
| 74 | + return true; |
| 75 | + } |
| 76 | + |
| 77 | + public function getTokenSalt() { |
| 78 | + return ''; |
| 79 | + } |
72 | 80 | |
73 | 81 | public function getAllowedParams() { |
74 | 82 | return array( |
— | — | @@ -84,6 +92,7 @@ |
85 | 93 | ApiBase::PARAM_ISMULTI => true, |
86 | 94 | ApiBase::PARAM_DFLT => '', |
87 | 95 | ), |
| 96 | + 'token' => null, |
88 | 97 | ); |
89 | 98 | } |
90 | 99 | |
— | — | @@ -92,6 +101,7 @@ |
93 | 102 | 'name' => 'The name of the survey', |
94 | 103 | 'enabled' => 'Enable the survey or not', |
95 | 104 | 'questions' => 'The questions that make up the survey', |
| 105 | + 'token' => 'Edit token. You can get one of these through prop=info.', |
96 | 106 | ); |
97 | 107 | } |
98 | 108 | |
— | — | @@ -116,6 +126,6 @@ |
117 | 127 | |
118 | 128 | public function getVersion() { |
119 | 129 | return __CLASS__ . ': $Id$'; |
120 | | - } |
| 130 | + } |
121 | 131 | |
122 | 132 | } |
Index: trunk/extensions/Survey/api/ApiQuerySurveys.php |
— | — | @@ -104,6 +104,7 @@ |
105 | 105 | ApiBase :: PARAM_MAX2 => ApiBase :: LIMIT_BIG2 |
106 | 106 | ), |
107 | 107 | 'continue' => null, |
| 108 | + 'token' => null, |
108 | 109 | ); |
109 | 110 | |
110 | 111 | } |
— | — | @@ -119,6 +120,7 @@ |
120 | 121 | 'incquestions' => 'Include the questions of the surveys or not', |
121 | 122 | 'continue' => 'Offset number from where to continue the query', |
122 | 123 | 'limit' => 'Max amount of words to return', |
| 124 | + 'token' => 'Edit token. You can get one of these through prop=info.', |
123 | 125 | ); |
124 | 126 | } |
125 | 127 | |