From: Vincent Vanwaelscappel Date: Wed, 22 Nov 2023 13:59:48 +0000 (+0100) Subject: wip #6501 @1 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=c62f1d87e28c37e71ba3d83f28ad9e2c2a4d8776;p=fluidbook-toolbox.git wip #6501 @1 --- diff --git a/.docker/dev/update.sh b/.docker/dev/update.sh index 8c12d9153..d399473f1 100644 --- a/.docker/dev/update.sh +++ b/.docker/dev/update.sh @@ -1,12 +1,12 @@ #!/bin/sh cd /docker/fluidbook-toolbox-dev docker plugin install ucphhpc/sshfs --grant-all-permissions -/home/toolbox/www/scripts/fixrights.sh +/home/toolbox/dev/scripts/fixrights.sh chown root:root /home/toolbox/dev/.docker/config/cron/host;ln -sf /home/toolbox/dev/.docker/config/cron/host /etc/cron.d/toolbox-dev docker network create fluidbook-toolbox-dev docker compose down docker volume rm fluidbook-toolbox-dev_sshfsusstorage docker compose up -d -/home/toolbox/www/scripts/fixrights.sh +/home/toolbox/dev/scripts/fixrights.sh docker exec -it fluidbook-toolbox /application/scripts/update.sh find /home/toolbox/dev/ -type d \( -path /home/toolbox/dev/.docker \) -prune -o -exec chown -R toolbox:www-data {} \; diff --git a/app/Console/Commands/FluidbookRegionMove.php b/app/Console/Commands/FluidbookRegionMove.php index f205b734c..6ba656d98 100644 --- a/app/Console/Commands/FluidbookRegionMove.php +++ b/app/Console/Commands/FluidbookRegionMove.php @@ -14,15 +14,17 @@ class FluidbookRegionMove extends CubistCommand public function handle() { $region = $this->argument('region'); - $id = $this->argument('id'); + $ids = explode(',', $this->argument('id')); if (!in_array($region, Region::getAllRegionsCodes())) { throw new \Exception('Invalid region ' . $region); } - /** @var FluidbookPublication $fb */ - $fb = FluidbookPublication::withoutGlobalScopes()->find($id); - if (null === $fb) { - throw new \Exception('Fluidbook ' . $id . ' not found'); + foreach ($ids as $id) { + /** @var FluidbookPublication $fb */ + $fb = FluidbookPublication::withoutGlobalScopes()->find($id); + if (null === $fb) { + throw new \Exception('Fluidbook ' . $id . ' not found'); + } + $fb->moveRegion($region); } - $fb->moveRegion($region); } }