X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fjobqueue%2Fjobs%2FPublishStashedFileJob.php;h=59166e8035f75c50977af6c742c13d97e3456427;hb=cc167acbc65567a1030d946b4644363b0fccf090;hp=3d4cfae7fe8bcb3e1f7689a3f50a8f9f4c7a89b7;hpb=61b2f07f6b4eb3ff676130126b40f519e125690c;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/jobqueue/jobs/PublishStashedFileJob.php b/includes/jobqueue/jobs/PublishStashedFileJob.php index 3d4cfae7fe..59166e8035 100644 --- a/includes/jobqueue/jobs/PublishStashedFileJob.php +++ b/includes/jobqueue/jobs/PublishStashedFileJob.php @@ -19,20 +19,23 @@ * * @file * @ingroup Upload + * @ingroup JobQueue */ /** * Upload a file from the upload stash into the local file repo. * * @ingroup Upload + * @ingroup JobQueue */ class PublishStashedFileJob extends Job { - public function __construct( $title, $params ) { + public function __construct( Title $title, array $params ) { parent::__construct( 'PublishStashedFile', $title, $params ); $this->removeDuplicates = true; } public function run() { + /** @noinspection PhpUnusedLocalVariableInspection */ $scope = RequestContext::importScopedSession( $this->params['session'] ); $context = RequestContext::getMain(); $user = $context->getUser(); @@ -118,7 +121,7 @@ class PublishStashedFileJob extends Job { 'status' => Status::newFatal( 'api-error-publishfailed' ) ) ); - $this->setLastError( get_class( $e ) . ": " . $e->getText() ); + $this->setLastError( get_class( $e ) . ": " . $e->getMessage() ); // To prevent potential database referential integrity issues. // See bug 32551. MWExceptionHandler::rollbackMasterChangesAndLog( $e );