Index: trunk/phase3/includes/api/ApiMove.php |
— | — | @@ -39,11 +39,6 @@ |
40 | 40 | public function execute() { |
41 | 41 | global $wgUser; |
42 | 42 | $params = $this->extractRequestParams(); |
43 | | - |
44 | | - if ( isset( $params['watch'] ) && isset( $params['unwatch'] ) ) { |
45 | | - $this->dieUsageMsg( array( 'show' ) ); |
46 | | - } |
47 | | - |
48 | 43 | if ( is_null( $params['reason'] ) ) { |
49 | 44 | $params['reason'] = ''; |
50 | 45 | } |
— | — | @@ -216,7 +211,6 @@ |
217 | 212 | array( 'notanarticle' ), |
218 | 213 | array( 'invalidtitle', 'to' ), |
219 | 214 | array( 'sharedfile-exists' ), |
220 | | - array( 'show' ), |
221 | 215 | ) ); |
222 | 216 | } |
223 | 217 | |
Index: trunk/phase3/includes/api/ApiProtect.php |
— | — | @@ -39,10 +39,6 @@ |
40 | 40 | public function execute() { |
41 | 41 | global $wgUser, $wgRestrictionTypes, $wgRestrictionLevels; |
42 | 42 | $params = $this->extractRequestParams(); |
43 | | - |
44 | | - if ( isset( $params['watch'] ) && isset( $params['unwatch'] ) ) { |
45 | | - $this->dieUsageMsg( array( 'show' ) ); |
46 | | - } |
47 | 43 | |
48 | 44 | $titleObj = null; |
49 | 45 | if ( !isset( $params['title'] ) ) { |
— | — | @@ -119,10 +115,7 @@ |
120 | 116 | $articleObj = new Article( $titleObj ); |
121 | 117 | if ( $params['watch'] ) { |
122 | 118 | $articleObj->doWatch(); |
123 | | - } elseif ( $params['unwatch'] ) { |
124 | | - $articleObj->doUnwatch(); |
125 | 119 | } |
126 | | - |
127 | 120 | if ( $titleObj->exists() ) { |
128 | 121 | $ok = $articleObj->updateRestrictions( $protections, $params['reason'], $cascade, $expiryarray ); |
129 | 122 | } else { |
— | — | @@ -168,7 +161,6 @@ |
169 | 162 | 'reason' => '', |
170 | 163 | 'cascade' => false, |
171 | 164 | 'watch' => false, |
172 | | - 'unwatch' => false, |
173 | 165 | ); |
174 | 166 | } |
175 | 167 | |
— | — | @@ -183,7 +175,6 @@ |
184 | 176 | 'cascade' => array( 'Enable cascading protection (i.e. protect pages included in this page)', |
185 | 177 | 'Ignored if not all protection levels are \'sysop\' or \'protect\'' ), |
186 | 178 | 'watch' => 'If set, add the page being (un)protected to your watchlist', |
187 | | - 'unwatch' => 'Remove the page being (un)protected from your watchlist', |
188 | 179 | ); |
189 | 180 | } |
190 | 181 | |
— | — | @@ -205,7 +196,6 @@ |
206 | 197 | array( 'protect-invalidlevel', 'level' ), |
207 | 198 | array( 'invalidexpiry', 'expiry' ), |
208 | 199 | array( 'pastexpiry', 'expiry' ), |
209 | | - array( 'show' ), |
210 | 200 | ) ); |
211 | 201 | } |
212 | 202 | |
Index: trunk/phase3/includes/api/ApiRollback.php |
— | — | @@ -38,10 +38,6 @@ |
39 | 39 | |
40 | 40 | public function execute() { |
41 | 41 | $params = $this->extractRequestParams(); |
42 | | - |
43 | | - if ( isset( $params['watch'] ) && isset( $params['unwatch'] ) ) { |
44 | | - $this->dieUsageMsg( array( 'show' ) ); |
45 | | - } |
46 | 42 | |
47 | 43 | $titleObj = null; |
48 | 44 | if ( !isset( $params['title'] ) ) { |
— | — | @@ -76,12 +72,6 @@ |
77 | 73 | // We don't care about multiple errors, just report one of them |
78 | 74 | $this->dieUsageMsg( reset( $retval ) ); |
79 | 75 | } |
80 | | - |
81 | | - if ( $params['watch'] || $wgUser->getOption( 'watchdeletion' ) ) { |
82 | | - $articleObj->doWatch(); |
83 | | - } elseif ( $params['unwatch'] ) { |
84 | | - $articleObj->doUnwatch(); |
85 | | - } |
86 | 76 | |
87 | 77 | $info = array( |
88 | 78 | 'title' => $titleObj->getPrefixedText(), |
— | — | @@ -109,9 +99,7 @@ |
110 | 100 | 'user' => null, |
111 | 101 | 'token' => null, |
112 | 102 | 'summary' => null, |
113 | | - 'markbot' => false, |
114 | | - 'watch' => false, |
115 | | - 'unwatch' => false, |
| 103 | + 'markbot' => false |
116 | 104 | ); |
117 | 105 | } |
118 | 106 | |
— | — | @@ -121,9 +109,7 @@ |
122 | 110 | 'user' => 'Name of the user whose edits are to be rolled back. If set incorrectly, you\'ll get a badtoken error.', |
123 | 111 | 'token' => 'A rollback token previously retrieved through prop=revisions', |
124 | 112 | 'summary' => 'Custom edit summary. If not set, default summary will be used.', |
125 | | - 'markbot' => 'Mark the reverted edits and the revert as bot edits', |
126 | | - 'watch' => 'Add the page to your watchlist', |
127 | | - 'unwatch' => 'Remove the page from your watchlist', |
| 113 | + 'markbot' => 'Mark the reverted edits and the revert as bot edits' |
128 | 114 | ); |
129 | 115 | } |
130 | 116 | |
— | — | @@ -141,7 +127,6 @@ |
142 | 128 | array( 'invalidtitle', 'title' ), |
143 | 129 | array( 'notanarticle' ), |
144 | 130 | array( 'invaliduser', 'user' ), |
145 | | - array( 'show' ), |
146 | 131 | ) ); |
147 | 132 | } |
148 | 133 | |
Index: trunk/phase3/includes/api/ApiDelete.php |
— | — | @@ -52,10 +52,6 @@ |
53 | 53 | $params = $this->extractRequestParams(); |
54 | 54 | |
55 | 55 | $this->requireOnlyOneParameter( $params, 'title', 'pageid' ); |
56 | | - |
57 | | - if ( isset( $params['watch'] ) && isset( $params['unwatch'] ) ) { |
58 | | - $this->dieUsageMsg( array( 'show' ) ); |
59 | | - } |
60 | 56 | |
61 | 57 | if ( isset( $params['title'] ) ) { |
62 | 58 | $titleObj = Title::newFromText( $params['title'] ); |
— | — | @@ -231,7 +227,6 @@ |
232 | 228 | array( 'nosuchpageid', 'pageid' ), |
233 | 229 | array( 'notanarticle' ), |
234 | 230 | array( 'hookaborted', 'error' ), |
235 | | - array( 'show' ), |
236 | 231 | ) ); |
237 | 232 | } |
238 | 233 | |
Index: trunk/phase3/includes/api/ApiUndelete.php |
— | — | @@ -39,10 +39,6 @@ |
40 | 40 | public function execute() { |
41 | 41 | global $wgUser; |
42 | 42 | $params = $this->extractRequestParams(); |
43 | | - |
44 | | - if ( isset( $params['watch'] ) && isset( $params['unwatch'] ) ) { |
45 | | - $this->dieUsageMsg( array( 'show' ) ); |
46 | | - } |
47 | 43 | |
48 | 44 | $titleObj = null; |
49 | 45 | if ( !isset( $params['title'] ) ) { |
— | — | @@ -81,14 +77,6 @@ |
82 | 78 | $this->dieUsageMsg( array( 'cannotundelete' ) ); |
83 | 79 | } |
84 | 80 | |
85 | | - if ( $params['watch'] ) { |
86 | | - $articleObj = new Article( $titleObj ); |
87 | | - $articleObj->doWatch(); |
88 | | - } elseif ( $params['unwatch'] ) { |
89 | | - $articleObj = new Article( $titleObj ); |
90 | | - $articleObj->doUnwatch(); |
91 | | - } |
92 | | - |
93 | 81 | if ( $retval[1] ) { |
94 | 82 | wfRunHooks( 'FileUndeleteComplete', |
95 | 83 | array( $titleObj, array(), $wgUser, $params['reason'] ) ); |
— | — | @@ -116,9 +104,7 @@ |
117 | 105 | 'reason' => '', |
118 | 106 | 'timestamps' => array( |
119 | 107 | ApiBase::PARAM_ISMULTI => true |
120 | | - ), |
121 | | - 'watch' => false, |
122 | | - 'unwatch' => false, |
| 108 | + ) |
123 | 109 | ); |
124 | 110 | } |
125 | 111 | |
— | — | @@ -127,9 +113,7 @@ |
128 | 114 | 'title' => 'Title of the page you want to restore.', |
129 | 115 | 'token' => 'An undelete token previously retrieved through list=deletedrevs', |
130 | 116 | 'reason' => 'Reason for restoring (optional)', |
131 | | - 'timestamps' => 'Timestamps of the revisions to restore. If not set, all revisions will be restored.', |
132 | | - 'watch' => 'Add the page to your watchlist', |
133 | | - 'unwatch' => 'Remove the page from your watchlist', |
| 117 | + 'timestamps' => 'Timestamps of the revisions to restore. If not set, all revisions will be restored.' |
134 | 118 | ); |
135 | 119 | } |
136 | 120 | |
— | — | @@ -147,7 +131,6 @@ |
148 | 132 | array( 'blockedtext' ), |
149 | 133 | array( 'invalidtitle', 'title' ), |
150 | 134 | array( 'cannotundelete' ), |
151 | | - array( 'show' ), |
152 | 135 | ) ); |
153 | 136 | } |
154 | 137 | |
Index: trunk/phase3/includes/api/ApiUpload.php |
— | — | @@ -47,10 +47,6 @@ |
48 | 48 | |
49 | 49 | $this->mParams = $this->extractRequestParams(); |
50 | 50 | $request = $this->getMain()->getRequest(); |
51 | | - |
52 | | - if ( isset( $this->mParams['watch'] ) && isset( $this->mParams['unwatch'] ) ) { |
53 | | - $this->dieUsageMsg( array( 'show' ) ); |
54 | | - } |
55 | 51 | |
56 | 52 | // Add the uploaded file to the params array |
57 | 53 | $this->mParams['file'] = $request->getFileName( 'file' ); |
— | — | @@ -226,10 +222,6 @@ |
227 | 223 | // No errors, no warnings: do the upload |
228 | 224 | $status = $this->mUpload->performUpload( $this->mParams['comment'], |
229 | 225 | $this->mParams['text'], $this->mParams['watch'], $wgUser ); |
230 | | - |
231 | | - if ( $this->mParams['unwatch'] ) { |
232 | | - $wgUser->removeWatch( $file->getTitle() ); |
233 | | - } |
234 | 226 | |
235 | 227 | if ( !$status->isGood() ) { |
236 | 228 | $error = $status->getErrorsArray(); |
— | — | @@ -263,7 +255,6 @@ |
264 | 256 | 'text' => null, |
265 | 257 | 'token' => null, |
266 | 258 | 'watch' => false, |
267 | | - 'unwatch' => false, |
268 | 259 | 'ignorewarnings' => false, |
269 | 260 | 'file' => null, |
270 | 261 | 'url' => null, |
— | — | @@ -279,7 +270,6 @@ |
280 | 271 | 'comment' => 'Upload comment. Also used as the initial page text for new files if "text" is not specified', |
281 | 272 | 'text' => 'Initial page text for new files', |
282 | 273 | 'watch' => 'Watch the page', |
283 | | - 'watch' => 'Unwatch the page', |
284 | 274 | 'ignorewarnings' => 'Ignore any warnings', |
285 | 275 | 'file' => 'File contents', |
286 | 276 | 'url' => 'Url to fetch the file from', |
— | — | @@ -312,7 +302,6 @@ |
313 | 303 | array( 'mustbeloggedin', 'upload' ), |
314 | 304 | array( 'badaccess-groups' ), |
315 | 305 | array( 'badaccess-groups' ), |
316 | | - array( 'show' ), |
317 | 306 | array( 'code' => 'fetchfileerror', 'info' => '' ), |
318 | 307 | array( 'code' => 'nomodule', 'info' => 'No upload module set' ), |
319 | 308 | array( 'code' => 'empty-file', 'info' => 'The file you submitted was empty' ), |