$revision = $this->mArticle->getRevisionFetched();
if ( $revision === null ) {
if ( !$this->contentModel ) {
- $this->contentModel = $this->getTitle()->getContentModel();
+ throw new RuntimeException( 'EditPage contentModel was false' );
}
$handler = ContentHandler::getForModelID( $this->contentModel );
if ( $content === false || $content === null ) {
if ( !$this->contentModel ) {
- $this->contentModel = $this->getTitle()->getContentModel();
+ throw new RuntimeException( 'EditPage contentModel was false' );
}
$handler = ContentHandler::getForModelID( $this->contentModel );
}
# Give a notice if the user is editing a deleted/moved page...
if ( !$this->mTitle->exists() ) {
+ $dbr = wfGetDB( DB_REPLICA );
+
LogEventsList::showLogExtract( $wgOut, [ 'delete', 'move' ], $this->mTitle,
'',
[
'lim' => 10,
- 'conds' => [ "log_action != 'revision'" ],
+ 'conds' => [ 'log_action != ' . $dbr->addQuotes( 'revision' ) ],
'showIfEmpty' => false,
'msgKey' => [ 'recreate-moveddeleted-warn' ]
]