r31460 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r31459‎ | r31460 | r31461 >
Date:19:09, 2 March 2008
Author:catrope
Status:old
Tags:
Comment:
ApiEdit_Vodafone: Committing latest work
Modified paths:
  • /branches/ApiEdit_Vodafone/includes/SpecialEditTest.php (modified) (history)
  • /branches/ApiEdit_Vodafone/includes/api/ApiEditPage.php (modified) (history)

Diff [purge]

Index: branches/ApiEdit_Vodafone/includes/api/ApiEditPage.php
@@ -41,7 +41,6 @@
4242
4343 public function execute() {
4444 global $wgUser;
45 - # TODO: Watch/stopwatching support + respect prefs
4645 $this->getMain()->requestWriteMode();
4746
4847 $params = $this->extractRequestParams();
@@ -94,7 +93,7 @@
9594
9695 if($params['watch'])
9796 $watch = true;
98 - else if($params['dontwatch'])
 97+ else if($params['unwatch'])
9998 $watch = false;
10099 else if($titleObj->userIsWatching())
101100 $watch = true;
@@ -217,14 +216,14 @@
218217 'captchaword' => null,
219218 'captchaid' => null,
220219 'watch' => false,
221 - 'stopwatching' => false,
 220+ 'unwatch' => false,
222221 );
223222 }
224223
225224 protected function getParamDescription() {
226225 return array (
227 - 'title' => 'Title of article',
228 - 'text' => 'Article content',
 226+ 'title' => 'Page title',
 227+ 'text' => 'Page content',
229228 'token' => 'Edit token. You can get one of these through prop=info',
230229 'summary' => 'Edit summary',
231230 'minor' => 'Minor edit',
@@ -234,8 +233,8 @@
235234 'Used to detect edit conflicts; leave blank to ignore conflicts.'
236235 ),
237236 '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',
240239 'captchaid' => 'CAPTCHA ID from previous request',
241240 'captchaword' => 'Answer to the CAPTCHA',
242241 );
Index: branches/ApiEdit_Vodafone/includes/SpecialEditTest.php
@@ -63,6 +63,8 @@
6464 $retval .= $this->buildCheckBoxLine('Minor edit', 'minor');
6565 $retval .= $this->buildCheckBoxLine('Bot edit', 'bot');
6666 $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');
6769 $retval .= $this->buildTableRow(Xml::label('Article content', 'text'),
6870 Xml::openElement('textarea', array(
6971 'name' => 'text',

Status & tagging log