]> BookStack Code Mirror - bookstack/blobdiff - app/Console/Commands/CleanupImages.php
Move logFailedAccess into Activity
[bookstack] / app / Console / Commands / CleanupImages.php
index 5eadf275157424ef80e83f16ce682fffa728f149..f2e2d9fbd4465a3544e96e54c4649fb54fe81e05 100644 (file)
@@ -2,7 +2,7 @@
 
 namespace BookStack\Console\Commands;
 
-use BookStack\Services\ImageService;
+use BookStack\Uploads\ImageService;
 use Illuminate\Console\Command;
 use Symfony\Component\Console\Output\OutputInterface;
 
@@ -30,7 +30,7 @@ class CleanupImages extends Command
 
     /**
      * Create a new command instance.
-     * @param ImageService $imageService
+     * @param \BookStack\Uploads\ImageService $imageService
      */
     public function __construct(ImageService $imageService)
     {
@@ -55,7 +55,7 @@ class CleanupImages extends Command
             }
         }
 
-        $deleted = $this->imageService->deleteUnusedImages($checkRevisions, ['gallery', 'drawio'], $dryRun);
+        $deleted = $this->imageService->deleteUnusedImages($checkRevisions, $dryRun);
         $deleteCount = count($deleted);
 
         if ($dryRun) {
@@ -72,7 +72,9 @@ class CleanupImages extends Command
 
     protected function showDeletedImages($paths)
     {
-        if ($this->getOutput()->getVerbosity() <= OutputInterface::VERBOSITY_NORMAL) return;
+        if ($this->getOutput()->getVerbosity() <= OutputInterface::VERBOSITY_NORMAL) {
+            return;
+        }
         if (count($paths) > 0) {
             $this->line('Images to delete:');
         }