r81448 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81447‎ | r81448 | r81449 >
Date:13:22, 3 February 2011
Author:catrope
Status:ok
Tags:
Comment:
1.17: Revert r67094 (RevisionMove) and followups including r67099, r67111, r67112, r67115, r67398
Modified paths:
  • /branches/REL1_17/phase3/RELEASE-NOTES (modified) (history)
  • /branches/REL1_17/phase3/includes/Article.php (modified) (history)
  • /branches/REL1_17/phase3/includes/AutoLoader.php (modified) (history)
  • /branches/REL1_17/phase3/includes/DefaultSettings.php (modified) (history)
  • /branches/REL1_17/phase3/includes/HistoryPage.php (modified) (history)
  • /branches/REL1_17/phase3/includes/LogPage.php (modified) (history)
  • /branches/REL1_17/phase3/includes/SpecialPage.php (modified) (history)
  • /branches/REL1_17/phase3/includes/Wiki.php (modified) (history)
  • /branches/REL1_17/phase3/includes/specials/SpecialRevisionMove.php (deleted) (history)
  • /branches/REL1_17/phase3/languages/messages/MessagesEn.php (modified) (history)
  • /branches/REL1_17/phase3/maintenance/language/messageTypes.inc (modified) (history)
  • /branches/REL1_17/phase3/maintenance/language/messages.inc (modified) (history)

Diff [purge]

Index: branches/REL1_17/phase3/maintenance/language/messages.inc
@@ -751,25 +751,6 @@
752752 'suppressionlog',
753753 'suppressionlogtext',
754754 ),
755 - 'revisionmove' => array(
756 - 'moverevlogentry',
757 - 'revisionmove',
758 - 'revisionmove-backlink',
759 - 'revmove-explain',
760 - 'revmove-legend',
761 - 'revmove-submit',
762 - 'revisionmoveselectedversions',
763 - 'revmove-reasonfield',
764 - 'revmove-titlefield',
765 - 'revmove-badparam-title' ,
766 - 'revmove-badparam',
767 - 'revmove-norevisions-title',
768 - 'revmove-norevisions',
769 - 'revmove-nullmove-title',
770 - 'revmove-nullmove',
771 - 'revmove-success-existing',
772 - 'revmove-success-created',
773 - ),
774755 'mergehistory' => array(
775756 'mergehistory',
776757 'mergehistory-header',
@@ -1113,7 +1094,6 @@
11141095 'right-reset-passwords',
11151096 'right-override-export-depth',
11161097 'right-sendemail',
1117 - 'right-revisionmove',
11181098 'right-disableaccount',
11191099 ),
11201100 'rightslog' => array(
@@ -1157,7 +1137,6 @@
11581138 'action-userrights',
11591139 'action-userrights-interwiki',
11601140 'action-siteadmin',
1161 - 'action-revisionmove',
11621141 ),
11631142 'recentchanges' => array(
11641143 'nchanges',
@@ -3284,7 +3263,6 @@
32853264 'history-feed' => 'Revision feed',
32863265 'revdelete' => 'Revision deletion',
32873266 'suppression' => 'Suppression log',
3288 - 'revisionmove' => 'Revision move',
32893267 'mergehistory' => 'History merging',
32903268 'mergelog' => 'Merge log',
32913269 'diffs' => 'Diffs',
Index: branches/REL1_17/phase3/maintenance/language/messageTypes.inc
@@ -364,7 +364,6 @@
365365 'prefs-memberingroups-type',
366366 'shared-repo-name-wikimediacommons',
367367 'usermessage-template',
368 - 'revisionmove-backlink',
369368 'filepage.css',
370369 );
371370
Index: branches/REL1_17/phase3/includes/Article.php
@@ -1773,12 +1773,10 @@
17741774 * on.
17751775 * @param $lastRevIsRedirect Boolean: if given, will optimize adding and
17761776 * removing rows in redirect table.
1777 - * @param $setNewFlag Boolean: Set to true if a page flag should be set
1778 - * Needed when $lastRevision has to be set to sth. !=0
17791777 * @return bool true on success, false on failure
17801778 * @private
17811779 */
1782 - public function updateRevisionOn( &$dbw, $revision, $lastRevision = null, $lastRevIsRedirect = null, $setNewFlag = false ) {
 1780+ public function updateRevisionOn( &$dbw, $revision, $lastRevision = null, $lastRevIsRedirect = null ) {
17831781 wfProfileIn( __METHOD__ );
17841782
17851783 $text = $revision->getText();
@@ -1791,15 +1789,11 @@
17921790 $conditions['page_latest'] = $lastRevision;
17931791 }
17941792
1795 - if ( !$setNewFlag ) {
1796 - $setNewFlag = ( $lastRevision === 0 );
1797 - }
1798 -
17991793 $dbw->update( 'page',
18001794 array( /* SET */
18011795 'page_latest' => $revision->getId(),
18021796 'page_touched' => $dbw->timestamp(),
1803 - 'page_is_new' => $setNewFlag,
 1797+ 'page_is_new' => ( $lastRevision === 0 ) ? 1 : 0,
18041798 'page_is_redirect' => $rt !== null ? 1 : 0,
18051799 'page_len' => strlen( $text ),
18061800 ),
Index: branches/REL1_17/phase3/includes/HistoryPage.php
@@ -417,23 +417,6 @@
418418 $s .= $element;
419419 $this->buttons .= $element;
420420 }
421 - if ( $wgUser->isAllowed( 'revisionmove' ) ) {
422 - $this->preventClickjacking();
423 - $float = $wgContLang->alignEnd();
424 - # Note bug #20966, <button> is non-standard in IE<8
425 - $element = Html::element( 'button',
426 - array(
427 - 'type' => 'submit',
428 - 'name' => 'revisionmove',
429 - 'value' => '1',
430 - 'style' => "float: $float;",
431 - 'class' => 'mw-history-revisionmove-button',
432 - ),
433 - wfMsg( 'revisionmoveselectedversions' )
434 - ) . "\n";
435 - $s .= $element;
436 - $this->buttons .= $element;
437 - }
438421 $this->buttons .= '</div>';
439422 $s .= '</div><ul id="pagehistory">' . "\n";
440423 return $s;
@@ -519,11 +502,10 @@
520503
521504 $del = '';
522505 // Show checkboxes for each revision
523 - if ( $wgUser->isAllowed( 'deleterevision' ) || $wgUser->isAllowed( 'revisionmove' ) ) {
 506+ if ( $wgUser->isAllowed( 'deleterevision' ) ) {
524507 $this->preventClickjacking();
525508 // If revision was hidden from sysops, disable the checkbox
526 - // However, if the user has revisionmove rights, we cannot disable the checkbox
527 - if ( !$rev->userCan( Revision::DELETED_RESTRICTED ) && !$wgUser->isAllowed( 'revisionmove' ) ) {
 509+ if ( !$rev->userCan( Revision::DELETED_RESTRICTED ) ) {
528510 $del = Xml::check( 'deleterevisions', false, array( 'disabled' => 'disabled' ) );
529511 // Otherwise, enable the checkbox...
530512 } else {
Index: branches/REL1_17/phase3/includes/AutoLoader.php
@@ -617,7 +617,6 @@
618618 'RevDel_ArchivedFileItem' => 'includes/revisiondelete/RevisionDelete.php',
619619 'RevDel_LogList' => 'includes/revisiondelete/RevisionDelete.php',
620620 'RevDel_LogItem' => 'includes/revisiondelete/RevisionDelete.php',
621 - 'SpecialRevisionMove' => 'includes/specials/SpecialRevisionMove.php',
622621 'ShortPagesPage' => 'includes/specials/SpecialShortpages.php',
623622 'SpecialActiveUsers' => 'includes/specials/SpecialActiveusers.php',
624623 'SpecialAllpages' => 'includes/specials/SpecialAllpages.php',
Index: branches/REL1_17/phase3/includes/Wiki.php
@@ -452,8 +452,6 @@
453453 if ( $action === 'historysubmit' ) {
454454 if ( $request->getBool( 'revisiondelete' ) ) {
455455 $action = 'revisiondelete';
456 - } elseif ( $request->getBool( 'revisionmove' ) ) {
457 - $action = 'revisionmove';
458456 } else {
459457 $action = 'view';
460458 }
@@ -542,11 +540,6 @@
543541 $special = SpecialPage::getPage( 'Revisiondelete' );
544542 $special->execute( '' );
545543 break;
546 - case 'revisionmove':
547 - // For revision move submission from history page
548 - $special = SpecialPage::getPage( 'RevisionMove' );
549 - $special->execute( '' );
550 - break;
551544 default:
552545 if( wfRunHooks( 'UnknownAction', array( $action, $article ) ) ) {
553546 $output->showErrorPage( 'nosuchaction', 'nosuchactiontext' );
Index: branches/REL1_17/phase3/includes/DefaultSettings.php
@@ -4746,7 +4746,6 @@
47474747 'upload/revert' => 'uploadedimage',
47484748 'move/move' => '1movedto2',
47494749 'move/move_redir' => '1movedto2_redir',
4750 - 'move/move_rev' => 'moverevlogentry',
47514750 'import/upload' => 'import-logentry-upload',
47524751 'import/interwiki' => 'import-logentry-interwiki',
47534752 'merge/merge' => 'pagemerge-logentry',
Index: branches/REL1_17/phase3/includes/specials/SpecialRevisionMove.php
@@ -1,403 +0,0 @@
2 -<?php
3 -/**
4 - * Implements Special:RevisionMove
5 - *
6 - * This program is free software; you can redistribute it and/or modify
7 - * it under the terms of the GNU General Public License as published by
8 - * the Free Software Foundation; either version 2 of the License, or
9 - * (at your option) any later version.
10 - *
11 - * This program is distributed in the hope that it will be useful,
12 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 - * GNU General Public License for more details.
15 - *
16 - * You should have received a copy of the GNU General Public License along
17 - * with this program; if not, write to the Free Software Foundation, Inc.,
18 - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 - * http://www.gnu.org/copyleft/gpl.html
20 - *
21 - * @file
22 - * @ingroup SpecialPage
23 - */
24 -
25 -/**
26 - * Special page allowing users with the appropriate permissions to
27 - * move revisions of a page to a new target (either an existing page or not)
28 - *
29 - * The user selects revisions in the page history (HistoryPage.php),
30 - * clicks on the submit button and gets this special page.
31 - * A form is shown (showForm()) where the user has to enter a target page
32 - * name and confirm the action with a post request & edit token.
33 - * Then submit() is called, which does some checks and calls moveRevisions().
34 - * If the target doesn't exist, a new page gets created. rev_page of the
35 - * selected revisions is updated, after that it is determined whether page_latest
36 - * of the target page and the source page require an update.
37 - *
38 - * **** NOTE: This feature is EXPERIMENTAL. ****
39 - * **** Do not use on any productive system. ****
40 - *
41 - * @ingroup SpecialPage
42 - * @todo In case page_deleted gets introduced some day, use it.
43 - * Currently it is possible with RevisionMove to make the latest revision
44 - * of a page a RevisionDeleted one. When that happens, the user is presented
45 - * an empty page with no error message whatsoever (in case he is not permitted
46 - * to view deleted edits).
47 -*/
48 -class SpecialRevisionMove extends UnlistedSpecialPage {
49 - # common objects
50 - var $mOldTitle; # Title object.
51 - var $mNewTitle; # Title object. Desired new title
52 - var $request; # WebRequest object, $wgRequest by default
53 - var $skin; # Skin object
54 - var $user; # User object
55 -
56 - # variables
57 - var $mIds; # Array of Ids to look at
58 - var $mRevlist; # RevDel_RevisionList object - borrowed from RevisionDelete
59 - var $mReason; # User-supplied reason for performing the move operation
60 - var $mSubmit; # Boolean: Is this a submitted request?
61 - var $mIsAllowedRevisionMove = false;
62 -
63 - public function __construct( $name = 'RevisionMove' ) {
64 - parent::__construct( $name );
65 - }
66 -
67 - /**
68 - * @param $par subpage part, standard special page parameter, is ignored here
69 - *
70 - * Mostly initializes variables and calls either showForm() or submit()
71 - */
72 - public function execute( $par ) {
73 - global $wgUser, $wgOut;
74 -
75 - $this->setHeaders();
76 - $this->outputHeader();
77 -
78 - $this->mIsAllowedRevisionMove = $wgUser->isAllowed( 'revisionmove' );
79 - $this->user = $wgUser;
80 - $this->skin = $wgUser->getSkin();
81 -
82 - if ( !$this->request instanceof WebRequest ) {
83 - $this->request = $GLOBALS['wgRequest'];
84 - }
85 -
86 - # Get correct title
87 - if ( $this->request->getVal( 'action' ) == 'historysubmit' ) {
88 - $this->mOldTitle = Title::newFromText( $this->request->getVal( 'title' ) );
89 - } else {
90 - $this->mOldTitle = Title::newFromText( $this->request->getVal( 'oldTitle' ) );
91 - }
92 -
93 - if ( !$this->mOldTitle instanceof Title ) {
94 - $wgOut->showErrorPage( 'revmove-badparam-title', 'revmove-badparam' );
95 - return;
96 - }
97 -
98 - $wgOut->setPagetitle( wfMsg( 'revisionmove', $this->mOldTitle->getPrefixedText() ) );
99 - $oldTitleLink = $this->skin->link( $this->mOldTitle );
100 - $wgOut->setSubtitle( wfMsg( 'revisionmove-backlink', $oldTitleLink ) );
101 -
102 - $this->mReason = $this->request->getText( 'wpReason' );
103 -
104 - # TODO maybe not needed here? Copied from SpecialRevisiondelete.php.
105 - # Keep for now, allow different inputs
106 - # Handle our many different possible input types for ids
107 - $ids = $this->request->getVal( 'ids' );
108 - if ( !is_null( $ids ) ) {
109 - # Allow CSV, for backwards compatibility, or a single ID for show/hide links
110 - $this->mIds = explode( ',', $ids );
111 - } else {
112 - # Array input
113 - $this->mIds = array_keys( $this->request->getArray( 'ids', array() ) );
114 - }
115 - $this->mIds = array_unique( array_filter( $this->mIds ) );
116 -
117 - if ( is_null ( $this->mIds ) ) {
118 - $wgOut->showErrorPage( 'revmove-badparam-title', 'revmove-badparam' );
119 - return;
120 - }
121 - $this->mRevlist = new RevDel_RevisionList( $this, $this->mOldTitle, $this->mIds );
122 -
123 - # Decide what to do: Show the form, or submit the changes
124 - if ( $this->request->wasPosted() ) {
125 - $this->submit();
126 - } else {
127 - $this->showForm();
128 - }
129 - }
130 -
131 - /**
132 - * Show a list of items that we will operate on and a field for the target name
133 - */
134 - public function showForm() {
135 - global $wgOut, $wgUser;
136 -
137 - if ( !$this->mIsAllowedRevisionMove ) {
138 - $permErrors = $this->mOldTitle->getUserPermissionsErrors( 'revisionmove', $this->user );
139 - $wgOut->showPermissionsErrorPage( $permErrors, 'revisionmove' );
140 - return false;
141 - }
142 -
143 - $wgOut->addWikiMsg( 'revmove-explain', $this->mOldTitle->getPrefixedText() );
144 - $listNotEmpty = $this->listItems();
145 - if ( !$listNotEmpty ) {
146 - return; # we're done, we already displayed an error earlier
147 - }
148 -
149 - $out = Xml::openElement( 'form', array( 'method' => 'post',
150 - 'action' => $this->getTitle()->getLocalUrl( array( 'action' => 'submit' ) ),
151 - 'id' => 'mw-revmove-form' ) ) .
152 - Xml::fieldset( wfMsg( 'revmove-legend' ) ) .
153 - Html::hidden( 'wpEditToken', $wgUser->editToken() ) .
154 - Html::hidden( 'oldTitle', $this->mOldTitle->getPrefixedText() ) .
155 - '<div>' . Xml::inputLabel( wfMsg( 'revmove-reasonfield' ), 'wpReason', 'revmove-reasonfield', 60 ) . '</div>' .
156 - Xml::inputLabel( wfMsg( 'revmove-titlefield' ), 'newTitle', 'revmove-titlefield', 20, $this->mOldTitle->getPrefixedText() ) .
157 - Html::hidden( 'ids', implode( ',', $this->mIds ) ) .
158 - Xml::submitButton( wfMsg( 'revmove-submit' ),
159 - array( 'name' => 'wpSubmit' ) ) .
160 - Xml::closeElement( 'fieldset' ) . "\n" .
161 - Xml::closeElement( 'form' ) . "\n";
162 - $wgOut->addHTML( $out );
163 - }
164 -
165 - /**
166 - * Show a list of selected revisions and check the input
167 - */
168 - protected function listItems() {
169 - global $wgOut;
170 -
171 - $wgOut->addHTML( "<ul>" );
172 -
173 - $numRevisions = 0;
174 -
175 - # No revisions specified at all
176 - if ( $this->mIds == array() ) {
177 - $wgOut->showErrorPage( 'revmove-norevisions-title', 'revmove-norevisions' );
178 - return false;
179 - }
180 -
181 - for ( $this->mRevlist->reset(); $this->mRevlist->current(); $this->mRevlist->next() ) {
182 - $item = $this->mRevlist->current();
183 - $numRevisions++;
184 - $wgOut->addHTML( $item->getHTML() );
185 - }
186 -
187 - # No valid revisions specified (e.g. only revs belonging to another page)
188 - if ( $numRevisions == 0 ) {
189 - $wgOut->showErrorPage( 'revmove-norevisions-title', 'revmove-norevisions' );
190 - return false;
191 - }
192 -
193 - $wgOut->addHTML( "</ul>" );
194 -
195 - return true;
196 - }
197 -
198 - /**
199 - * Submit the posted changes (in $this->request).
200 - *
201 - * This function does some checks and then calls moveRevisions(), which does the real work
202 - */
203 - public function submit() {
204 - global $wgUser, $wgOut;
205 -
206 - # Confirm permissions
207 - if ( !$this->mIsAllowedRevisionMove ) {
208 - $permErrors = $this->mOldTitle->getUserPermissionsErrors( 'revisionmove', $this->user );
209 - $wgOut->showPermissionsErrorPage( $permErrors, 'revisionmove' );
210 - return false;
211 - }
212 -
213 - # Confirm Token
214 - if ( !$wgUser->matchEditToken( $this->request->getVal( 'wpEditToken' ) ) ) {
215 - $wgOut->showErrorPage( 'sessionfailure-title', 'sessionfailure' );
216 - return false;
217 - }
218 -
219 - $this->mNewTitle = Title::newFromText( $this->request->getVal( 'newTitle' ) );
220 - if ( !$this->mNewTitle instanceof Title ) {
221 - $wgOut->showErrorPage( 'badtitle', 'badtitletext' );
222 - return false;
223 - }
224 -
225 - if ( $this->mNewTitle->getPrefixedText() == $this->mOldTitle->getPrefixedText() ) {
226 - $pagename = array( $this->mOldTitle->getPrefixedText() );
227 - $wgOut->showErrorPage( 'revmove-nullmove-title', 'revmove-nullmove', $pagename );
228 - return;
229 - }
230 -
231 - $this->moveRevisions();
232 - }
233 -
234 - /**
235 - * This function actually move the revision. NEVER call this function, call submit()
236 - */
237 - protected function moveRevisions() {
238 - $oldArticle = new Article( $this->mOldTitle );
239 - $newArticle = new Article( $this->mNewTitle );
240 -
241 - $idstring = implode( ", ", $this->mIds );
242 -
243 - # Get DB connection and begin transaction
244 - $dbw = wfGetDB( DB_MASTER );
245 - $dbw->begin();
246 -
247 - # Check if the target exists. If not, try creating it
248 - if ( !$this->mNewTitle->exists() ) {
249 - $newArticle->insertOn( $dbw );
250 - $this->createArticle = true;
251 - } else {
252 - $this->createArticle = false;
253 - }
254 -
255 - # This is where the magic happens:
256 - # Update revision table
257 - $dbw->update( 'revision',
258 - array( 'rev_page' => $this->mNewTitle->getArticleID() ),
259 - array(
260 - 'rev_id IN (' . $idstring . ')',
261 - 'rev_page' => $this->mOldTitle->getArticleID(),
262 - ),
263 - __METHOD__
264 - );
265 - $modifiedRevsNum = $dbw->affectedRows();
266 -
267 - # Check if we need to update page_latest
268 - # Get the latest version of the revisions we are moving
269 - $timestampNewPage = $this->queryLatestTimestamp(
270 - $dbw,
271 - $this->mNewTitle->getArticleID(),
272 - array( 'rev_id IN (' . $idstring . ')' )
273 - );
274 -
275 - # Compare the new page's page_latest against db query.
276 - # If we create a new page, we have to update anyway
277 -
278 - $currentNewPageRev = Revision::newFromId( $this->mNewTitle->getLatestRevID() );
279 - if ( $this->createArticle || $timestampNewPage > $currentNewPageRev->getTimestamp() ) {
280 - # we have to set page_latest to $timestampNewPage's revid
281 - $this->updatePageLatest(
282 - $dbw,
283 - $this->mNewTitle,
284 - $newArticle,
285 - $timestampNewPage,
286 - array( 'rev_id IN (' . $idstring . ')' )
287 - );
288 - }
289 -
290 - # Update the old page's page_latest field
291 - $timestampOldPage = $this->queryLatestTimestamp(
292 - $dbw,
293 - $this->mOldTitle->getArticleID()
294 - );
295 -
296 - # If the timestamp is null that means the page doesn't have
297 - # any revisions associated and should be deleted. In other words,
298 - # someone misused revisionmove for the normal move function.
299 - if ( is_null( $timestampOldPage ) ) {
300 - $dbw->delete(
301 - 'page',
302 - array( 'page_id = ' . $this->mOldTitle->getArticleID() ),
303 - __METHOD__
304 - );
305 - } else {
306 - # page_latest has to be updated
307 - $currentOldPageRev = Revision::newFromId( $this->mOldTitle->getLatestRevID() );
308 - if ( $timestampOldPage < $currentOldPageRev->getTimestamp() ) {
309 - $this->updatePageLatest(
310 - $dbw,
311 - $this->mOldTitle,
312 - $oldArticle,
313 - $timestampOldPage
314 - );
315 - }
316 - # Purge the old one only if it hasn't been deleted
317 - $oldArticle->doPurge();
318 - }
319 -
320 - # All done, commit
321 - $dbw->commit();
322 -
323 - $this->logMove( $modifiedRevsNum );
324 -
325 - # Purge new article
326 - $newArticle->doPurge();
327 -
328 - # If noting went wrong (i.e. returned), we are successful
329 - $this->showSuccess( $modifiedRevsNum );
330 - }
331 -
332 - /**
333 - * Query for the latest timestamp in order to update page_latest and
334 - * page_timestamp.
335 - * @param &$dbw Database object (Master)
336 - * @param $articleId Integer page_id
337 - * @param $conds array database conditions
338 - *
339 - * @return String timestamp
340 - */
341 - protected function queryLatestTimestamp( &$dbw, $articleId, $conds = array() ) {
342 - $timestampNewRow = $dbw->selectRow(
343 - 'revision',
344 - 'max(rev_timestamp) as maxtime',
345 - array_merge( array( 'rev_page' => $articleId ), $conds ),
346 - __METHOD__
347 - );
348 - return $timestampNewRow->maxtime;
349 - }
350 -
351 - /**
352 - * Updates page_latest and similar database fields (see Article::updateRevisionOn).
353 - * Called two times, for the new and the old page
354 - *
355 - * @param &$dbw Database object (Master)
356 - * @param $articleTitle Title object of the page
357 - * @param $articleObj Article object of the page
358 - * @param $timestamp to search for (use queryLatestTimestamp to get the latest)
359 - * @param $conds array database conditions
360 - *
361 - * @return boolean indicating success
362 - */
363 - protected function updatePageLatest( &$dbw, $articleTitle, &$articleObj, $timestamp, $conds = array() ) {
364 - # Query to find out the rev_id
365 - $revisionRow = $dbw->selectRow(
366 - 'revision',
367 - 'rev_id',
368 - array_merge( array(
369 - 'rev_timestamp' => $timestamp,
370 - 'rev_page' => $articleTitle->getArticleID(),
371 - ), $conds ),
372 - __METHOD__
373 - );
374 -
375 - # Update page_latest
376 - $latestRev = Revision::newFromId( $revisionRow->rev_id );
377 - return $articleObj->updateRevisionOn( $dbw, $latestRev, $articleTitle->getLatestRevID(), null, /* set new page flag */ true );
378 - }
379 -
380 - /**
381 - * Add a log entry for the revision move
382 - */
383 - protected function logMove( $modifiedRevsNum ) {
384 - $paramArray = array(
385 - $this->mNewTitle->getPrefixedText(),
386 - $modifiedRevsNum
387 - );
388 -
389 - $log = new LogPage( 'move' );
390 - $log->addEntry( 'move_rev', $this->mOldTitle, $this->mReason, $paramArray, $this->user );
391 - }
392 -
393 - protected function showSuccess( $modifiedRevsNum ) {
394 - global $wgOut;
395 -
396 - if ( $this->createArticle ) {
397 - $wgOut->addWikiMsg( 'revmove-success-created', $modifiedRevsNum,
398 - $this->mOldTitle->getPrefixedText(), $this->mNewTitle->getPrefixedText() );
399 - } else {
400 - $wgOut->addWikiMsg( 'revmove-success-existing', $modifiedRevsNum,
401 - $this->mOldTitle->getPrefixedText(), $this->mNewTitle->getPrefixedText() );
402 - }
403 - }
404 -}
Index: branches/REL1_17/phase3/includes/SpecialPage.php
@@ -193,7 +193,6 @@
194194 'Mytalk' => 'SpecialMytalk',
195195 'Myuploads' => 'SpecialMyuploads',
196196 'Revisiondelete' => 'SpecialRevisionDelete',
197 - 'RevisionMove' => 'SpecialRevisionMove',
198197 'Specialpages' => 'SpecialSpecialpages',
199198 'Userlogout' => 'SpecialUserlogout',
200199 );
Index: branches/REL1_17/phase3/includes/LogPage.php
@@ -259,7 +259,7 @@
260260 }
261261
262262 // Page moves
263 - } elseif ( $type == 'move' && count( $params ) == 3 && $action != 'move_rev' ) {
 263+ } elseif ( $type == 'move' && count( $params ) == 3 ) {
264264 if( $params[2] ) {
265265 if ( $skin ) {
266266 $details .= ' [' . wfMsg( 'move-redirect-suppressed' ) . ']';
Index: branches/REL1_17/phase3/languages/messages/MessagesEn.php
@@ -459,7 +459,6 @@
460460 'DeletedContributions' => array( 'DeletedContributions' ),
461461 'Tags' => array( 'Tags' ),
462462 'Activeusers' => array( 'ActiveUsers' ),
463 - 'RevisionMove' => array( 'RevisionMove' ),
464463 'ComparePages' => array( 'ComparePages' ),
465464 'Badtitle' => array( 'Badtitle' ),
466465 'DisableAccount' => array( 'DisableAccount' ),
@@ -1563,27 +1562,6 @@
15641563 'suppressionlogtext' => 'Below is a list of deletions and blocks involving content hidden from administrators.
15651564 See the [[Special:IPBlockList|IP block list]] for the list of currently operational bans and blocks.',
15661565
1567 -# Revision move
1568 -'moverevlogentry' => 'moved {{PLURAL:$3|one revision|$3 revisions}} from $1 to $2',
1569 -'revisionmove' => 'Move revisions from "$1"',
1570 -'revisionmove-backlink' => '← $1', # only translate this message to other languages if you have to change it
1571 -'revmove-explain' => 'The following revisions will be moved from $1 to the specified target page. If the target does not exist, it is created. Otherwise, these revisions will be merged into the page history.',
1572 -'revmove-legend' => 'Set target page and summary',
1573 -'revmove-submit' => 'Move revisions to selected page',
1574 -'revisionmoveselectedversions' => 'Move selected revisions',
1575 -'revmove-reasonfield' => 'Reason:',
1576 -'revmove-titlefield' => 'Target page:',
1577 -'revmove-badparam-title' => 'Bad parameters',
1578 -'revmove-badparam' => 'Your request contains illegal or insufficient parameters.
1579 -Go back to the previous page and try again.',
1580 -'revmove-norevisions-title' => 'Invalid target revision',
1581 -'revmove-norevisions' => 'You have not specified one or more target revisions to perform this function or the specified revision does not exist.',
1582 -'revmove-nullmove-title' => 'Bad title',
1583 -'revmove-nullmove' => 'The target page cannot be the same as the source page.
1584 -Go back to the previous page and choose a different name from "$1".',
1585 -'revmove-success-existing' => '{{PLURAL:$1|One revision from [[$2]] has|$1 revisions from [[$2]] have}} been moved to the existing page [[$3]].',
1586 -'revmove-success-created' => '{{PLURAL:$1|One revision from [[$2]] has|$1 revisions from [[$2]] have}} been moved to the newly created page [[$3]].',
1587 -
15881566 # History merging
15891567 'mergehistory' => 'Merge page histories',
15901568 'mergehistory-header' => 'This page lets you merge revisions of the history of one source page into a newer page.
@@ -1953,7 +1931,6 @@
19541932 'right-reset-passwords' => "Reset other users' passwords",
19551933 'right-override-export-depth' => 'Export pages including linked pages up to a depth of 5',
19561934 'right-sendemail' => 'Send e-mail to other users',
1957 -'right-revisionmove' => 'Move revisions',
19581935 'right-disableaccount' => 'Disable accounts',
19591936
19601937 # User rights log
@@ -1997,7 +1974,6 @@
19981975 'action-userrights' => 'edit all user rights',
19991976 'action-userrights-interwiki' => 'edit user rights of users on other wikis',
20001977 'action-siteadmin' => 'lock or unlock the database',
2001 -'action-revisionmove' => 'move revisions',
20021978
20031979 # Recent changes
20041980 'nchanges' => '$1 {{PLURAL:$1|change|changes}}',
Index: branches/REL1_17/phase3/RELEASE-NOTES
@@ -139,9 +139,6 @@
140140 notified about the beginning and finishing of LivePreview actions.
141141 * (bug 21278) Now the sidebar allows inclusion of wiki markup.
142142 * (bug 23733) Add IDs to messages used on CSS/JS pages
143 -* (bug 21312) RevisionMove allows moving individual revisions of a page to
144 - another page. Introducing 'revisionmove' user right; disabled by default;
145 - experimental feature.
146143 * Show validity period of the login cookie in Special:UserLogin and
147144 Special:Preferences
148145 * Interlanguage links display the page title in their tooltip.

Follow-up revisions

RevisionCommit summaryAuthorDate
r81450* Rebuild messages files after removal of messages in r81445 and r81448....siebrand14:51, 3 February 2011
r86155Merge r81448 from REL1_17: reverting RevisionMove feature back out until some...demon23:28, 15 April 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r67094New feature RevisionMove (bug 21312). Introducing SpecialRevisionMove.php and...churchofemacs18:00, 30 May 2010
r67099fixing messages of r67094. thanks to siebrand for these suggestionschurchofemacs18:21, 30 May 2010
r67111Follow-up r67094: Tweak message filesraymond19:51, 30 May 2010
r67112Follow-up r67094: Tweak message filesraymond20:06, 30 May 2010
r67115Follow-up r67094: Tweak message filesraymond20:20, 30 May 2010
r67398follow-up on r67094: fixing presumed cause for php strict standards message a...churchofemacs11:59, 5 June 2010

Status & tagging log