Merge "Replace deprecated calls to OutputPage::parse()"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 1 Nov 2018 17:20:45 +0000 (17:20 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 1 Nov 2018 17:20:45 +0000 (17:20 +0000)
1  2 
includes/skins/Skin.php
includes/specials/SpecialUpload.php

diff --combined includes/skins/Skin.php
@@@ -1444,7 -1444,7 +1444,7 @@@ abstract class Skin extends ContextSour
                        return $newMessagesAlert;
                }
  
 -              if ( count( $newtalks ) == 1 && $newtalks[0]['wiki'] === wfWikiID() ) {
 +              if ( count( $newtalks ) == 1 && WikiMap::isCurrentWikiId( $newtalks[0]['wiki'] ) ) {
                        $uTalkTitle = $user->getTalkPage();
                        $lastSeenRev = $newtalks[0]['rev'] ?? null;
                        $nofAuthors = 0;
                        // TTL in seconds
                        600,
                        function () use ( $notice ) {
-                               return $this->getOutput()->parse( $notice );
+                               return $this->getOutput()->parseAsInterface( $notice );
                        }
                );
  
@@@ -324,13 -324,7 +324,13 @@@ class SpecialUpload extends SpecialPag
                                );
                                $link = $this->msg( $user->isAllowed( 'delete' ) ? 'thisisdeleted' : 'viewdeleted' )
                                        ->rawParams( $restorelink )->parseAsBlock();
 -                              $this->getOutput()->addHTML( "<div id=\"contentSub2\">{$link}</div>" );
 +                              $this->getOutput()->addHTML(
 +                                      Html::rawElement(
 +                                              'div',
 +                                              [ 'id' => 'contentSub2' ],
 +                                              $link
 +                                      )
 +                              );
                        }
                }
        }
                // Fetch the file if required
                $status = $this->mUpload->fetchFile();
                if ( !$status->isOK() ) {
-                       $this->showUploadError( $this->getOutput()->parse( $status->getWikiText() ) );
+                       $this->showUploadError( $this->getOutput()->parseAsInterface( $status->getWikiText() ) );
  
                        return;
                }
                        $changeTagsStatus = ChangeTags::canAddTagsAccompanyingChange(
                                $changeTags, $this->getUser() );
                        if ( !$changeTagsStatus->isOK() ) {
-                               $this->showUploadError( $this->getOutput()->parse( $changeTagsStatus->getWikiText() ) );
+                               $this->showUploadError( $this->getOutput()->parseAsInterface(
+                                       $changeTagsStatus->getWikiText()
+                               ) );
  
                                return;
                        }
                );
  
                if ( !$status->isGood() ) {
-                       $this->showRecoverableUploadError( $this->getOutput()->parse( $status->getWikiText() ) );
+                       $this->showRecoverableUploadError(
+                               $this->getOutput()->parseAsInterface( $status->getWikiText() )
+                       );
  
                        return;
                }