Index: branches/REL1_16/phase3/includes/api/ApiMove.php |
— | — | @@ -219,6 +219,10 @@ |
220 | 220 | ) ); |
221 | 221 | } |
222 | 222 | |
| 223 | + public function needsToken() { |
| 224 | + return true; |
| 225 | + } |
| 226 | + |
223 | 227 | public function getTokenSalt() { |
224 | 228 | return ''; |
225 | 229 | } |
Index: branches/REL1_16/phase3/includes/api/ApiProtect.php |
— | — | @@ -184,8 +184,12 @@ |
185 | 185 | ) ); |
186 | 186 | } |
187 | 187 | |
| 188 | + public function needsToken() { |
| 189 | + return true; |
| 190 | + } |
| 191 | + |
188 | 192 | public function getTokenSalt() { |
189 | | - return null; |
| 193 | + return ''; |
190 | 194 | } |
191 | 195 | |
192 | 196 | protected function getExamples() { |
Index: branches/REL1_16/phase3/includes/api/ApiUserrights.php |
— | — | @@ -101,6 +101,10 @@ |
102 | 102 | array( 'missingparam', 'user' ), |
103 | 103 | ) ); |
104 | 104 | } |
| 105 | + |
| 106 | + public function needsToken() { |
| 107 | + return true; |
| 108 | + } |
105 | 109 | |
106 | 110 | public function getTokenSalt() { |
107 | 111 | $params = $this->extractRequestParams(); |
Index: branches/REL1_16/phase3/includes/api/ApiDelete.php |
— | — | @@ -230,6 +230,10 @@ |
231 | 231 | ) ); |
232 | 232 | } |
233 | 233 | |
| 234 | + public function needsToken() { |
| 235 | + return true; |
| 236 | + } |
| 237 | + |
234 | 238 | public function getTokenSalt() { |
235 | 239 | return ''; |
236 | 240 | } |
Index: branches/REL1_16/phase3/includes/api/ApiImport.php |
— | — | @@ -149,6 +149,10 @@ |
150 | 150 | ) ); |
151 | 151 | } |
152 | 152 | |
| 153 | + public function needsToken() { |
| 154 | + return true; |
| 155 | + } |
| 156 | + |
153 | 157 | public function getTokenSalt() { |
154 | 158 | return ''; |
155 | 159 | } |
Index: branches/REL1_16/phase3/includes/api/ApiEditPage.php |
— | — | @@ -454,6 +454,10 @@ |
455 | 455 | ); |
456 | 456 | } |
457 | 457 | |
| 458 | + public function needsToken() { |
| 459 | + return true; |
| 460 | + } |
| 461 | + |
458 | 462 | public function getTokenSalt() { |
459 | 463 | return ''; |
460 | 464 | } |
Index: branches/REL1_16/phase3/includes/api/ApiUnblock.php |
— | — | @@ -116,6 +116,10 @@ |
117 | 117 | ) ); |
118 | 118 | } |
119 | 119 | |
| 120 | + public function needsToken() { |
| 121 | + return true; |
| 122 | + } |
| 123 | + |
120 | 124 | public function getTokenSalt() { |
121 | 125 | return ''; |
122 | 126 | } |
Index: branches/REL1_16/phase3/includes/api/ApiEmailUser.php |
— | — | @@ -112,6 +112,10 @@ |
113 | 113 | ) ); |
114 | 114 | } |
115 | 115 | |
| 116 | + public function needsToken() { |
| 117 | + return true; |
| 118 | + } |
| 119 | + |
116 | 120 | public function getTokenSalt() { |
117 | 121 | return ''; |
118 | 122 | } |
Index: branches/REL1_16/phase3/includes/api/ApiBlock.php |
— | — | @@ -175,6 +175,10 @@ |
176 | 176 | ) ); |
177 | 177 | } |
178 | 178 | |
| 179 | + public function needsToken() { |
| 180 | + return true; |
| 181 | + } |
| 182 | + |
179 | 183 | public function getTokenSalt() { |
180 | 184 | return ''; |
181 | 185 | } |
Index: branches/REL1_16/phase3/includes/api/ApiPatrol.php |
— | — | @@ -92,6 +92,10 @@ |
93 | 93 | ) ); |
94 | 94 | } |
95 | 95 | |
| 96 | + public function needsToken() { |
| 97 | + return true; |
| 98 | + } |
| 99 | + |
96 | 100 | public function getTokenSalt() { |
97 | 101 | return ''; |
98 | 102 | } |
Index: branches/REL1_16/phase3/includes/api/ApiUndelete.php |
— | — | @@ -125,6 +125,10 @@ |
126 | 126 | ) ); |
127 | 127 | } |
128 | 128 | |
| 129 | + public function needsToken() { |
| 130 | + return true; |
| 131 | + } |
| 132 | + |
129 | 133 | public function getTokenSalt() { |
130 | 134 | return ''; |
131 | 135 | } |
Index: branches/REL1_16/phase3/includes/api/ApiBase.php |
— | — | @@ -1006,6 +1006,14 @@ |
1007 | 1007 | } |
1008 | 1008 | |
1009 | 1009 | /** |
| 1010 | + * Returns whether this module requires a Token to execute |
| 1011 | + * @returns bool |
| 1012 | + */ |
| 1013 | + public function needsToken() { |
| 1014 | + return false; |
| 1015 | + } |
| 1016 | + |
| 1017 | + /** |
1010 | 1018 | * Returns the token salt if there is one, '' if the module doesn't require a salt, else false if the module doesn't need a token |
1011 | 1019 | * @returns bool |
1012 | 1020 | */ |
— | — | @@ -1033,7 +1041,7 @@ |
1034 | 1042 | $ret[] = array( 'writedisabled' ); |
1035 | 1043 | } |
1036 | 1044 | |
1037 | | - if ( $this->getTokenSalt() !== false ) { |
| 1045 | + if ( $this->needsToken() ) { |
1038 | 1046 | $ret[] = array( 'missingparam', 'token' ); |
1039 | 1047 | $ret[] = array( 'sessionfailure' ); |
1040 | 1048 | } |
Property changes on: branches/REL1_16/phase3/includes/api/ApiBase.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
1041 | 1049 | Merged /trunk/phase3/includes/api/ApiBase.php:r74098-74099 |
Property changes on: branches/REL1_16/phase3/includes/api/ApiQueryAllUsers.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
1042 | 1050 | Merged /trunk/phase3/includes/api/ApiQueryAllUsers.php:r74098-74099 |
Index: branches/REL1_16/phase3/includes/api/ApiUpload.php |
— | — | @@ -306,6 +306,10 @@ |
307 | 307 | ) ); |
308 | 308 | } |
309 | 309 | |
| 310 | + public function needsToken() { |
| 311 | + return true; |
| 312 | + } |
| 313 | + |
310 | 314 | public function getTokenSalt() { |
311 | 315 | return ''; |
312 | 316 | } |
Property changes on: branches/REL1_16/phase3/includes/api |
___________________________________________________________________ |
Modified: svn:mergeinfo |
313 | 317 | Merged /trunk/phase3/includes/api:r74098-74099 |
Index: branches/REL1_16/phase3/RELEASE-NOTES |
— | — | @@ -51,6 +51,7 @@ |
52 | 52 | * For wikis setup in French language, Special:Téléchargement works again |
53 | 53 | as an alias for Special:Upload |
54 | 54 | * (bug 25167) Correctly load JS fixes for IE6 (fixing a regression in 1.16.0) |
| 55 | +* (bug 25248) API: paraminfo errors with certain modules |
55 | 56 | |
56 | 57 | == Changes since 1.16 beta 3 == |
57 | 58 | |