From ac5b2d6e94a9e9276e35c410f95b2ca1c35d9395 Mon Sep 17 00:00:00 2001 From: Yassine Doghri Date: Thu, 10 Jun 2021 08:14:06 +0000 Subject: [PATCH] ci(bundle): update bundle-prepare script --- app/Controllers/Admin/EpisodeController.php | 4 +++- app/Controllers/Admin/PodcastController.php | 3 ++- scripts/bundle-prepare.sh | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/Controllers/Admin/EpisodeController.php b/app/Controllers/Admin/EpisodeController.php index a49b3b5a..ab2e21b9 100644 --- a/app/Controllers/Admin/EpisodeController.php +++ b/app/Controllers/Admin/EpisodeController.php @@ -42,7 +42,7 @@ class EpisodeController extends BaseController if (count($params) > 1) { if ( - ! ($this->episode = (new EpisodeModel()) + ! ($episode = (new EpisodeModel()) ->where([ 'id' => $params[1], 'podcast_id' => $params[0], @@ -52,6 +52,8 @@ class EpisodeController extends BaseController throw PageNotFoundException::forPageNotFound(); } + $this->episode = $episode; + unset($params[1]); unset($params[0]); } diff --git a/app/Controllers/Admin/PodcastController.php b/app/Controllers/Admin/PodcastController.php index f1570d09..2b294778 100644 --- a/app/Controllers/Admin/PodcastController.php +++ b/app/Controllers/Admin/PodcastController.php @@ -33,8 +33,9 @@ class PodcastController extends BaseController } if ( - ($this->podcast = (new PodcastModel())->getPodcastById((int) $params[0])) !== null + ($podcast = (new PodcastModel())->getPodcastById((int) $params[0])) !== null ) { + $this->podcast = $podcast; return $this->{$method}(); } diff --git a/scripts/bundle-prepare.sh b/scripts/bundle-prepare.sh index fb2630cb..73e4e43f 100644 --- a/scripts/bundle-prepare.sh +++ b/scripts/bundle-prepare.sh @@ -1,7 +1,7 @@ #!/bin/bash # install only production dependencies using the --no-dev option -php composer.phar install --no-dev --prefer-dist --no-ansi --no-interaction --no-progress --ignore-platform-reqs +composer install --no-dev --prefer-dist --no-ansi --no-interaction --no-progress --ignore-platform-reqs # build all production static assets (css, js, images, icons, fonts, etc.) npm run build