* Avoid PHP warning in Creative Commons metadata when a creative commons
license is not actually set up
* (bug 8463) Don't print external link icons for Monobook
+* (bug 8461) Support watching pages on move
== Languages updated ==
class MovePageForm {
var $oldTitle, $newTitle, $reason; # Text input
var $moveTalk, $deleteAndMove;
+
+ private $watch = false;
function MovePageForm( $par ) {
global $wgRequest;
$this->moveTalk = $wgRequest->getBool( 'wpMovetalk', true );
}
$this->deleteAndMove = $wgRequest->getBool( 'wpDeleteAndMove' ) && $wgRequest->getBool( 'wpConfirm' );
+ $this->watch = $wgRequest->getCheck( 'wpWatch' );
}
function showForm( $err ) {
<td><label for=\"wpMovetalk\">{$movetalk}</label></td>
</tr>" );
}
+
+ $watchChecked = $this->watch || $wgUser->getBoolOption( 'watchmoves' ) || $ot->userIsWatching();
+ $watch = '<tr>';
+ $watch .= '<td align="right">' . Xml::check( 'wpWatch', $watchChecked, array( 'id' => 'watch' ) ) . '</td>';
+ $watch .= '<td>' . Xml::label( wfMsg( 'move-watch' ), 'watch' ) . '</td>';
+ $watch .= '</tr>';
+ $wgOut->addHtml( $watch );
+
$wgOut->addHTML( "
{$confirm}
<tr>
} else {
$talkmoved = 'notalkpage';
}
+
+ # Deal with watches
+ if( $this->watch ) {
+ $wgUser->addWatch( $ot );
+ $wgUser->addWatch( $nt );
+ } else {
+ $wgUser->removeWatch( $ot );
+ $wgUser->removeWatch( $nt );
+ }
# Give back result to user.
$titleObj = SpecialPage::getTitleFor( 'Movepage' );
$wgOut->addHtml( '<br /><br />' );
$wgOut->addHtml( $this->getToggles( array( 'watchlisthideown', 'watchlisthidebots', 'watchlisthideminor' ) ) );
- $wgOut->addHtml( $this->getToggles( array( 'watchdefault', 'watchcreations', 'watchdeletion' ) ) );
+ $wgOut->addHtml( $this->getToggles( array( 'watchdefault', 'watchcreations', 'watchmoves', 'watchdeletion' ) ) );
$wgOut->addHtml( '</fieldset>' );
'editwidth',
'watchcreations',
'watchdefault',
+ 'watchmoves',
'watchdeletion',
'minordefault',
'previewontop',
'tog-editwidth' => 'Edit box has full width',
'tog-watchcreations' => 'Add pages I create to my watchlist',
'tog-watchdefault' => 'Add pages I edit to my watchlist',
+'tog-watchmoves' => 'Add pages I move to my watchlist',
'tog-watchdeletion' => 'Add pages I delete to my watchlist',
'tog-minordefault' => 'Mark all edits minor by default',
'tog-previewontop' => 'Show preview before edit box',
'movenologintext' => "You must be a registered user and [[Special:Userlogin|logged in]]
to move a page.",
'newtitle' => 'To new title',
+'move-watch' => 'Watch this page',
'movepagebtn' => 'Move page',
'pagemovedsub' => 'Move succeeded',
'pagemovedtext' => "Page \"[[$1]]\" moved to \"[[$2]]\".",