*/
private function moveOverExistingRedirect( &$nt, $reason = '', $createRedirect = true ) {
global $wgUseSquid, $wgUser;
- $fname = 'Title::moveOverExistingRedirect';
+
$comment = wfMsgForContent( '1movedto2_redir', $this->getPrefixedText(), $nt->getPrefixedText() );
if ( $reason ) {
# by definition if we've got here it's rather uninteresting.
# We have to remove it so that the next step doesn't trigger
# a conflict on the unique namespace+title index...
- $dbw->delete( 'page', array( 'page_id' => $newid ), $fname );
+ $dbw->delete( 'page', array( 'page_id' => $newid ), __METHOD__ );
if ( !$dbw->cascadingDeletes() ) {
$dbw->delete( 'revision', array( 'rev_page' => $newid ), __METHOD__ );
global $wgUseTrackbacks;
'page_latest' => $nullRevId,
),
/* WHERE */ array( 'page_id' => $oldid ),
- $fname
+ __METHOD__
);
$nt->resetArticleID( $oldid );
# Now, we record the link from the redirect to the new title.
# It should have no other outgoing links...
- $dbw->delete( 'pagelinks', array( 'pl_from' => $newid ), $fname );
+ $dbw->delete( 'pagelinks', array( 'pl_from' => $newid ), __METHOD__ );
$dbw->insert( 'pagelinks',
array(
'pl_from' => $newid,
'pl_namespace' => $nt->getNamespace(),
'pl_title' => $nt->getDBkey() ),
- $fname );
+ __METHOD__ );
$redirectSuppressed = false;
} else {
$this->resetArticleID( 0 );
*/
private function moveToNewTitle( &$nt, $reason = '', $createRedirect = true ) {
global $wgUseSquid, $wgUser;
- $fname = 'MovePageForm::moveToNewTitle';
+
$comment = wfMsgForContent( '1movedto2', $this->getPrefixedText(), $nt->getPrefixedText() );
if ( $reason ) {
$comment .= wfMsgExt( 'colon-separator',
'page_latest' => $nullRevId,
),
/* WHERE */ array( 'page_id' => $oldid ),
- $fname
+ __METHOD__
);
$nt->resetArticleID( $oldid );
'pl_from' => $newid,
'pl_namespace' => $nt->getNamespace(),
'pl_title' => $nt->getDBkey() ),
- $fname );
+ __METHOD__ );
$redirectSuppressed = false;
} else {
$this->resetArticleID( 0 );