Merge "Revert "Use display name in category page subheadings if provided""
[lhc/web/wiklou.git] / includes / jobqueue / jobs / PublishStashedFileJob.php
index a6d2f70..37e80c2 100644 (file)
@@ -21,6 +21,7 @@
  * @ingroup Upload
  * @ingroup JobQueue
  */
+use Wikimedia\ScopedCallback;
 
 /**
  * Upload a file from the upload stash into the local file repo.
@@ -35,7 +36,6 @@ class PublishStashedFileJob extends Job {
        }
 
        public function run() {
-               /** @noinspection PhpUnusedLocalVariableInspection */
                $scope = RequestContext::importScopedSession( $this->params['session'] );
                $this->addTeardownCallback( function () use ( &$scope ) {
                        ScopedCallback::consume( $scope ); // T126450
@@ -92,7 +92,7 @@ class PublishStashedFileJob extends Job {
                                        $this->params['filekey'],
                                        [ 'result' => 'Failure', 'stage' => 'publish', 'status' => $status ]
                                );
-                               $this->setLastError( $status->getWikiText() );
+                               $this->setLastError( $status->getWikiText( false, false, 'en' ) );
 
                                return false;
                        }