Merge "Maintenance: init a user preference based on another preference"
[lhc/web/wiklou.git] / includes / specials / SpecialUndelete.php
index 04f5be4..56920b3 100644 (file)
@@ -21,6 +21,7 @@
  * @ingroup SpecialPage
  */
 use MediaWiki\MediaWikiServices;
+use Wikimedia\Rdbms\ResultWrapper;
 
 /**
  * Used to show archived pages and eventually restore them.
@@ -465,7 +466,7 @@ class PageArchive {
 
                # Does this page already exist? We'll have to update it...
                $article = WikiPage::factory( $this->title );
-               # Load latest data for the current page (bug 31179)
+               # Load latest data for the current page (T33179)
                $article->loadPageData( 'fromdbmaster' );
                $oldcountable = $article->isCountable();
 
@@ -1141,8 +1142,8 @@ class SpecialUndelete extends SpecialPage {
                                'textarea',
                                [
                                        'readonly' => 'readonly',
-                                       'cols' => $user->getIntOption( 'cols' ),
-                                       'rows' => $user->getIntOption( 'rows' )
+                                       'cols' => 80,
+                                       'rows' => 25
                                ],
                                $content->getNativeData() . "\n"
                        );
@@ -1806,11 +1807,9 @@ class SpecialUndelete extends SpecialPage {
                // Show revision undeletion warnings and errors
                $status = $archive->getRevisionStatus();
                if ( $status && !$status->isGood() ) {
-                       $out->addWikiText( '<div class="error">' .
-                               $status->getWikiText(
-                                       'cannotundelete',
-                                       'cannotundelete'
-                               ) . '</div>'
+                       $out->wrapWikiMsg(
+                               "<div class=\"error\" id=\"mw-error-cannotundelete\">\n$1\n</div>",
+                               'cannotundelete'
                        );
                }