} elseif ( $action == 'delete' ) {
$tempErrors = $this->checkPageRestrictions( 'edit',
$user, array(), $doExpensiveQueries, true );
- if( !$tempErrors ) {
+ if ( !$tempErrors ) {
$tempErrors = $this->checkCascadingSourcesRestrictions( 'edit',
$user, $tempErrors, $doExpensiveQueries, true );
}
// @note: splitTitleString() is a temporary hack to allow MediaWikiTitleCodec to share
// the parsing code with Title, while avoiding massive refactoring.
// @todo: get rid of secureAndSplit, refactor parsing code.
- $parser = self::getTitleParser();
- $parts = $parser->splitTitleString( $dbkey, $this->getDefaultNamespace() );
+ $titleParser = self::getTitleParser();
+ $parts = $titleParser->splitTitleString( $dbkey, $this->getDefaultNamespace() );
} catch ( MalformedTitleException $ex ) {
return false;
}
$redirectContent = null;
}
+ // bug 57084: log_page should be the ID of the *moved* page
+ $oldid = $this->getArticleID();
+ $logTitle = clone $this;
+
$logEntry = new ManualLogEntry( 'move', $logType );
$logEntry->setPerformer( $wgUser );
- $logEntry->setTarget( $this );
+ $logEntry->setTarget( $logTitle );
$logEntry->setComment( $reason );
$logEntry->setParameters( array(
'4::target' => $nt->getPrefixedText(),
# Truncate for whole multibyte characters.
$comment = $wgContLang->truncate( $comment, 255 );
- $oldid = $this->getArticleID();
-
$dbw = wfGetDB( DB_MASTER );
$newpage = WikiPage::factory( $nt );