Index: branches/ApiEdit_Vodafone/includes/api/ApiEditPage.php |
— | — | @@ -41,7 +41,6 @@ |
42 | 42 | |
43 | 43 | public function execute() { |
44 | 44 | global $wgUser; |
45 | | - # TODO: Watch/stopwatching support + respect prefs |
46 | 45 | $this->getMain()->requestWriteMode(); |
47 | 46 | |
48 | 47 | $params = $this->extractRequestParams(); |
— | — | @@ -94,7 +93,7 @@ |
95 | 94 | |
96 | 95 | if($params['watch']) |
97 | 96 | $watch = true; |
98 | | - else if($params['dontwatch']) |
| 97 | + else if($params['unwatch']) |
99 | 98 | $watch = false; |
100 | 99 | else if($titleObj->userIsWatching()) |
101 | 100 | $watch = true; |
— | — | @@ -217,14 +216,14 @@ |
218 | 217 | 'captchaword' => null, |
219 | 218 | 'captchaid' => null, |
220 | 219 | 'watch' => false, |
221 | | - 'stopwatching' => false, |
| 220 | + 'unwatch' => false, |
222 | 221 | ); |
223 | 222 | } |
224 | 223 | |
225 | 224 | protected function getParamDescription() { |
226 | 225 | return array ( |
227 | | - 'title' => 'Title of article', |
228 | | - 'text' => 'Article content', |
| 226 | + 'title' => 'Page title', |
| 227 | + 'text' => 'Page content', |
229 | 228 | 'token' => 'Edit token. You can get one of these through prop=info', |
230 | 229 | 'summary' => 'Edit summary', |
231 | 230 | 'minor' => 'Minor edit', |
— | — | @@ -234,8 +233,8 @@ |
235 | 234 | 'Used to detect edit conflicts; leave blank to ignore conflicts.' |
236 | 235 | ), |
237 | 236 | 'recreate' => 'Override any errors about the article having been deleted in the meantime', |
238 | | - 'watch' => 'Put article in watchlist', |
239 | | - 'stopwatching' => 'Take the article off the watchlist', |
| 237 | + 'watch' => 'Add the page to your watchlist', |
| 238 | + 'unwatch' => 'Remove the page from your watchlist', |
240 | 239 | 'captchaid' => 'CAPTCHA ID from previous request', |
241 | 240 | 'captchaword' => 'Answer to the CAPTCHA', |
242 | 241 | ); |
Index: branches/ApiEdit_Vodafone/includes/SpecialEditTest.php |
— | — | @@ -63,6 +63,8 @@ |
64 | 64 | $retval .= $this->buildCheckBoxLine('Minor edit', 'minor');
|
65 | 65 | $retval .= $this->buildCheckBoxLine('Bot edit', 'bot');
|
66 | 66 | $retval .= $this->buildCheckBoxLine('Recreate page if deleted in the meantime', 'recreate');
|
| 67 | + $retval .= $this->buildCheckBoxLine('Watch page', 'watch');
|
| 68 | + $retval .= $this->buildCheckBoxLine('Unwatch page', 'unwatch');
|
67 | 69 | $retval .= $this->buildTableRow(Xml::label('Article content', 'text'),
|
68 | 70 | Xml::openElement('textarea', array(
|
69 | 71 | 'name' => 'text',
|