X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/dabe79a438f22612e7d68c8d1de7817505b59b93..refs/pull/3193/head:/app/Console/Commands/CopyShelfPermissions.php diff --git a/app/Console/Commands/CopyShelfPermissions.php b/app/Console/Commands/CopyShelfPermissions.php index d9a1c1d72..32adf0683 100644 --- a/app/Console/Commands/CopyShelfPermissions.php +++ b/app/Console/Commands/CopyShelfPermissions.php @@ -2,7 +2,7 @@ namespace BookStack\Console\Commands; -use BookStack\Entities\Bookshelf; +use BookStack\Entities\Models\Bookshelf; use BookStack\Entities\Repos\BookshelfRepo; use Illuminate\Console\Command; @@ -23,7 +23,7 @@ class CopyShelfPermissions extends Command * * @var string */ - protected $description = 'Copy shelf permissions to all child books.'; + protected $description = 'Copy shelf permissions to all child books'; /** * @var BookshelfRepo @@ -54,13 +54,14 @@ class CopyShelfPermissions extends Command if (!$cascadeAll && !$shelfSlug) { $this->error('Either a --slug or --all option must be provided.'); + return; } if ($cascadeAll) { $continue = $this->confirm( - 'Permission settings for all shelves will be cascaded. '. - 'Books assigned to multiple shelves will receive only the permissions of it\'s last processed shelf. '. + 'Permission settings for all shelves will be cascaded. ' . + 'Books assigned to multiple shelves will receive only the permissions of it\'s last processed shelf. ' . 'Are you sure you want to proceed?' );