Merge "Revert "Use display name in category page subheadings if provided""
[lhc/web/wiklou.git] / includes / jobqueue / jobs / AssembleUploadChunksJob.php
index f3fcadf..e2914be 100644 (file)
@@ -20,6 +20,7 @@
  * @file
  * @ingroup Upload
  */
+use Wikimedia\ScopedCallback;
 
 /**
  * Assemble the segments of a chunked upload.
@@ -73,6 +74,10 @@ class AssembleUploadChunksJob extends Job {
                                return false;
                        }
 
+                       // We can only get warnings like 'duplicate' after concatenating the chunks
+                       $status = Status::newGood();
+                       $status->value = [ 'warnings' => $upload->checkWarnings() ];
+
                        // We have a new filekey for the fully concatenated file
                        $newFileKey = $upload->getStashFile()->getFileKey();
 
@@ -95,7 +100,7 @@ class AssembleUploadChunksJob extends Job {
                                        'stage' => 'assembling',
                                        'filekey' => $newFileKey,
                                        'imageinfo' => $imageInfo,
-                                       'status' => Status::newGood()
+                                       'status' => $status
                                ]
                        );
                } catch ( Exception $e ) {