}
$link = '[[' . $wgContLang->getNsText( NS_USER ) . ":{$name}|{$name}]]";
- $blockid = $block->mId;
+ $blockid = $block->getId();
$blockExpiry = $user->mBlock->mExpiry;
$blockTimestamp = $wgLang->timeanddate( wfTimestamp( TS_MW, $user->mBlock->mTimestamp ), true );
if ( $blockExpiry == 'infinity' ) {
$blockExpiry = $wgLang->timeanddate( wfTimestamp( TS_MW, $blockExpiry ), true );
}
- $intended = $user->mBlock->mAddress;
+ $intended = $user->mBlock->getTarget();
$errors[] = array( ( $block->mAuto ? 'autoblockedtext' : 'blockedtext' ), $link, $reason, $ip, $name,
$blockid, $blockExpiry, $intended, $blockTimestamp );
}
$destFile = wfLocalFile( $nt );
- if ( !$wgUser->isAllowed( 'reupload-shared' ) && !$destfile->exists() && wfFindFile( $nt ) ) {
+ if ( !$wgUser->isAllowed( 'reupload-shared' ) && !$destFile->exists() && wfFindFile( $nt ) ) {
$errors[] = array( 'file-exists-sharedrepo' );
}
}
}
- $pageid = $this->getArticleID();
+ $dbw->begin(); # If $file was a LocalFile, its transaction would have closed our own.
+ $pageid = $this->getArticleID( GAID_FOR_UPDATE );
$protected = $this->isProtected();
$pageCountChange = ( $createRedirect ? 1 : 0 ) - ( $nt->exists() ? 1 : 0 );
// Do the actual move
$err = $this->moveToInternal( $nt, $reason, $createRedirect );
if ( is_array( $err ) ) {
+ # FIXME: What about the File we have already moved?
+ $dbw->rollback();
return $err;
}
$u = new SearchUpdate( $redirid, $this->getPrefixedDBkey(), '' );
$u->doUpdate();
+ $dbw->commit();
+
# Update site_stats
if ( $this->isContentPage() && !$nt->isContentPage() ) {
# No longer a content page
if ( $reason ) {
$comment .= wfMsgForContent( 'colon-separator' ) . $reason;
}
- # Truncate for whole multibyte characters. +5 bytes for ellipsis
- $comment = $wgContLang->truncate( $comment, 250 );
+ # Truncate for whole multibyte characters.
+ $comment = $wgContLang->truncate( $comment, 255 );
$oldid = $this->getArticleID();
$latest = $this->getLatestRevID();
$redirectSuppressed = false;
} else {
// Get rid of old new page entries in Special:NewPages and RC.
- // Needs to be before $this->resetArticleUD( 0 ).
+ // Needs to be before $this->resetArticleID( 0 ).
$dbw->delete( 'recentchanges', array(
'rc_timestamp' => $dbw->timestamp( $this->getEarliestRevTime() ),
'rc_namespace' => $oldns,