/** @var bool Has a summary been preset using GET parameter &summary= ? */
public $hasPresetSummary = false;
- /** @var Revision|bool */
+ /** @var Revision|bool|null */
public $mBaseRevision = false;
/** @var bool */
/**
* @note: this method is very poorly named. If the user opened the form with ?oldid=X,
* one might think of X as the "base revision", which is NOT what this returns.
- * @return Revision Current version when the edit was started
+ * @return Revision|null Current version when the edit was started
*/
public function getBaseRevision() {
if ( !$this->mBaseRevision ) {
if ( $this->wasDeletedSinceLastEdit() && 'save' == $this->formtype ) {
$username = $this->lastDelete->user_name;
- $comment = CommentStore::newKey( 'log_comment' )->getComment( $this->lastDelete )->text;
+ $comment = CommentStore::getStore()
+ ->getComment( 'log_comment', $this->lastDelete )->text;
// It is better to not parse the comment at all than to have templates expanded in the middle
// TODO: can the checkLabel be moved outside of the div so that wrapWikiMsg could be used?
*/
protected function getLastDelete() {
$dbr = wfGetDB( DB_REPLICA );
- $commentQuery = CommentStore::newKey( 'log_comment' )->getJoin();
+ $commentQuery = CommentStore::getStore()->getJoin( 'log_comment' );
$data = $dbr->selectRow(
[ 'logging', 'user' ] + $commentQuery['tables'],
[
$this->mTitle, $pstContent, $user );
$parserOutput = $pstContent->getParserOutput( $this->mTitle, null, $parserOptions );
ScopedCallback::consume( $scopedCallback );
- $parserOutput->setEditSectionTokens( false ); // no section edit links
return [
'parserOutput' => $parserOutput,
'html' => $parserOutput->getText( [