LogEntry::setAssociatedRevId needs to be called before inserting,
otherwise log_params and log_search won't contain it. Also, set change
tags before inserting as well.
Bug: T191271
Change-Id: I190e58b015df90929d161d0def148851098a2542
$logEntry->setComment( $this->reason );
$logEntry->setPerformer( $this->getUser() );
$logEntry->setParameters( $logParams );
$logEntry->setComment( $this->reason );
$logEntry->setPerformer( $this->getUser() );
$logEntry->setParameters( $logParams );
- $logid = $logEntry->insert();
+ // Make sure the null revision will be tagged as well
+ $logEntry->setAssociatedRevId( $nullRevId );
if ( count( $this->logTags ) ) {
$logEntry->setTags( $this->logTags );
}
if ( count( $this->logTags ) ) {
$logEntry->setTags( $this->logTags );
}
- // Make sure the null revision will be tagged as well
- $logEntry->setAssociatedRevId( $nullRevId );
-
+ $logid = $logEntry->insert();
$logEntry->publish( $logid );
$logEntry->publish( $logid );
} else {
$this->getOutput()->addHTML( "<li>" . $linkRenderer->makeKnownLink( $title ) . " " .
$this->msg( 'import-nonewrevisions' )->escaped() . "</li>\n" );
} else {
$this->getOutput()->addHTML( "<li>" . $linkRenderer->makeKnownLink( $title ) . " " .
$this->msg( 'import-nonewrevisions' )->escaped() . "</li>\n" );