Tweak mw-ui padding to match oo-ui for buttons and text inputs
[lhc/web/wiklou.git] / includes / EditPage.php
index 34062c0..814da6a 100644 (file)
@@ -1256,7 +1256,7 @@ class EditPage {
                $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 );
 
@@ -1300,7 +1300,7 @@ class EditPage {
 
                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 );
 
@@ -2483,11 +2483,13 @@ class EditPage {
                }
                # 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' ]
                                ]