Loading app/Controllers/Admin/ContributorController.php +3 −3 Original line number Diff line number Diff line Loading @@ -107,9 +107,9 @@ class ContributorController extends BaseController { try { (new PodcastModel())->addPodcastContributor( $this->request->getPost('user'), (int) $this->request->getPost('user'), $this->podcast->id, $this->request->getPost('role'), (int) $this->request->getPost('role'), ); } catch (Exception) { return redirect() Loading Loading @@ -157,7 +157,7 @@ class ContributorController extends BaseController (new PodcastModel())->updatePodcastContributor( $this->user->id, $this->podcast->id, $this->request->getPost('role'), (int) $this->request->getPost('role'), ); return redirect()->route('contributor-list', [$this->podcast->id]); Loading app/Controllers/Admin/EpisodeController.php +4 −4 Original line number Diff line number Diff line Loading @@ -661,8 +661,8 @@ class EpisodeController extends BaseController $data = [ 'podcast_id' => $this->podcast->id, 'episode_id' => $this->episode->id, 'start_time' => (int) $soundbite['start_time'], 'duration' => (int) $soundbite['duration'], 'start_time' => (float) $soundbite['start_time'], 'duration' => (float) $soundbite['duration'], 'label' => $soundbite['label'], 'updated_by' => user_id(), ]; Loading @@ -688,9 +688,9 @@ class EpisodeController extends BaseController return redirect()->route('soundbites-edit', [$this->podcast->id, $this->episode->id]); } public function soundbiteDelete(int $soundbiteId): RedirectResponse public function soundbiteDelete(string $soundbiteId): RedirectResponse { (new SoundbiteModel())->deleteSoundbite($this->podcast->id, $this->episode->id, $soundbiteId); (new SoundbiteModel())->deleteSoundbite($this->podcast->id, $this->episode->id, (int) $soundbiteId); return redirect()->route('soundbites-edit', [$this->podcast->id, $this->episode->id]); } Loading app/Controllers/Admin/EpisodePersonController.php +2 −2 Original line number Diff line number Diff line Loading @@ -88,9 +88,9 @@ class EpisodePersonController extends BaseController return redirect()->back(); } public function remove(int $personId): RedirectResponse public function remove(string $personId): RedirectResponse { (new PersonModel())->removePersonFromEpisode($this->podcast->id, $this->episode->id, $personId); (new PersonModel())->removePersonFromEpisode($this->podcast->id, $this->episode->id, (int) $personId); return redirect()->back(); } Loading app/Controllers/Admin/PodcastController.php +31 −9 Original line number Diff line number Diff line Loading @@ -182,6 +182,15 @@ class PodcastController extends BaseController ->with('errors', $this->validator->getErrors()); } if ( ($partnerId = $this->request->getPost('partner_id')) === '' || ($partnerLinkUrl = $this->request->getPost('partner_link_url')) === '' || ($partnerImageUrl = $this->request->getPost('partner_image_url')) === '') { $partnerId = null; $partnerLinkUrl = null; $partnerImageUrl = null; } $podcast = new Podcast([ 'title' => $this->request->getPost('title'), 'name' => $this->request->getPost('name'), Loading @@ -199,11 +208,13 @@ class PodcastController extends BaseController 'type' => $this->request->getPost('type'), 'copyright' => $this->request->getPost('copyright'), 'location' => new Location($this->request->getPost('location_name'),), 'payment_pointer' => $this->request->getPost('payment_pointer'), 'payment_pointer' => $this->request->getPost( 'payment_pointer' ) === '' ? null : $this->request->getPost('payment_pointer'), 'custom_rss_string' => $this->request->getPost('custom_rss'), 'partner_id' => $this->request->getPost('partner_id'), 'partner_link_url' => $this->request->getPost('partner_link_url'), 'partner_image_url' => $this->request->getPost('partner_image_url'), 'partner_id' => $partnerId, 'partner_link_url' => $partnerLinkUrl, 'partner_image_url' => $partnerImageUrl, 'is_blocked' => $this->request->getPost('block') === 'yes', 'is_completed' => $this->request->getPost('complete') === 'yes', 'is_locked' => $this->request->getPost('lock') === 'yes', Loading @@ -227,7 +238,7 @@ class PodcastController extends BaseController $authorize = Services::authorization(); $podcastAdminGroup = $authorize->group('podcast_admin'); $podcastModel->addPodcastContributor(user_id(), $newPodcastId, $podcastAdminGroup->id); $podcastModel->addPodcastContributor(user_id(), $newPodcastId, (int) $podcastAdminGroup->id); // set Podcast categories (new CategoryModel())->setPodcastCategories( Loading Loading @@ -277,6 +288,15 @@ class PodcastController extends BaseController ->with('errors', $this->validator->getErrors()); } if ( ($partnerId = $this->request->getPost('partner_id')) === '' || ($partnerLinkUrl = $this->request->getPost('partner_link_url')) === '' || ($partnerImageUrl = $this->request->getPost('partner_image_url')) === '') { $partnerId = null; $partnerLinkUrl = null; $partnerImageUrl = null; } $this->podcast->title = $this->request->getPost('title'); $this->podcast->description_markdown = $this->request->getPost('description'); Loading @@ -296,11 +316,13 @@ class PodcastController extends BaseController $this->podcast->type = $this->request->getPost('type'); $this->podcast->copyright = $this->request->getPost('copyright'); $this->podcast->location = new Location($this->request->getPost('location_name')); $this->podcast->payment_pointer = $this->request->getPost('payment_pointer'); $this->podcast->payment_pointer = $this->request->getPost( 'payment_pointer' ) === '' ? null : $this->request->getPost('payment_pointer'); $this->podcast->custom_rss_string = $this->request->getPost('custom_rss'); $this->podcast->partner_id = $this->request->getPost('partner_id'); $this->podcast->partner_link_url = $this->request->getPost('partner_link_url'); $this->podcast->partner_image_url = $this->request->getPost('partner_image_url'); $this->podcast->partner_id = $partnerId; $this->podcast->partner_link_url = $partnerLinkUrl; $this->podcast->partner_image_url = $partnerImageUrl; $this->podcast->is_blocked = $this->request->getPost('block') === 'yes'; $this->podcast->is_completed = $this->request->getPost('complete') === 'yes'; Loading app/Controllers/Admin/PodcastImportController.php +7 −7 Original line number Diff line number Diff line Loading @@ -197,7 +197,7 @@ class PodcastImportController extends BaseController $authorize = Services::authorization(); $podcastAdminGroup = $authorize->group('podcast_admin'); $podcastModel->addPodcastContributor(user_id(), $newPodcastId, $podcastAdminGroup->id); $podcastModel->addPodcastContributor(user_id(), $newPodcastId, (int) $podcastAdminGroup->id); $podcastsPlatformsData = []; $platformTypes = [ Loading @@ -218,7 +218,7 @@ class PodcastImportController extends BaseController foreach ($platformTypes as $platformType) { foreach ($platformType['elements'] as $platform) { $platformLabel = $platform->attributes()['platform']; $platformSlug = slugify($platformLabel); $platformSlug = slugify((string) $platformLabel); if ($platformModel->getPlatform($platformSlug) !== null) { $podcastsPlatformsData[] = [ 'platform_slug' => $platformSlug, Loading Loading @@ -246,7 +246,7 @@ class PodcastImportController extends BaseController 'full_name' => $fullName, 'unique_name' => slugify($fullName), 'information_url' => $podcastPerson->attributes()['href'], 'image' => new Image(download_file($podcastPerson->attributes()['img'])), 'image' => new Image(download_file((string) $podcastPerson->attributes()['img'])), 'created_by' => user_id(), 'updated_by' => user_id(), ]); Loading Loading @@ -301,7 +301,7 @@ class PodcastImportController extends BaseController $slug = slugify( $this->request->getPost('slug_field') === 'title' ? $item->title ? (string) $item->title : basename($item->link), ); if (in_array($slug, $slugs, true)) { Loading Loading @@ -342,7 +342,7 @@ class PodcastImportController extends BaseController 'guid' => $item->guid ?? null, 'title' => $item->title, 'slug' => $slug, 'audio_file' => download_file($item->enclosure->attributes()['url'],), 'audio_file' => download_file((string) $item->enclosure->attributes()['url'],), 'description_markdown' => $converter->convert($itemDescriptionHtml,), 'description_html' => $itemDescriptionHtml, 'image' => $episodeImage, Loading Loading @@ -372,7 +372,7 @@ class PodcastImportController extends BaseController 'location' => $location, 'created_by' => user_id(), 'updated_by' => user_id(), 'published_at' => strtotime($item->pubDate), 'published_at' => strtotime((string) $item->pubDate), ]); $episodeModel = new EpisodeModel(); Loading @@ -396,7 +396,7 @@ class PodcastImportController extends BaseController 'full_name' => $fullName, 'unique_name' => slugify($fullName), 'information_url' => $episodePerson->attributes()['href'], 'image' => new Image(download_file($episodePerson->attributes()['img'])), 'image' => new Image(download_file((string) $episodePerson->attributes()['img'])), 'created_by' => user_id(), 'updated_by' => user_id(), ]); Loading Loading
app/Controllers/Admin/ContributorController.php +3 −3 Original line number Diff line number Diff line Loading @@ -107,9 +107,9 @@ class ContributorController extends BaseController { try { (new PodcastModel())->addPodcastContributor( $this->request->getPost('user'), (int) $this->request->getPost('user'), $this->podcast->id, $this->request->getPost('role'), (int) $this->request->getPost('role'), ); } catch (Exception) { return redirect() Loading Loading @@ -157,7 +157,7 @@ class ContributorController extends BaseController (new PodcastModel())->updatePodcastContributor( $this->user->id, $this->podcast->id, $this->request->getPost('role'), (int) $this->request->getPost('role'), ); return redirect()->route('contributor-list', [$this->podcast->id]); Loading
app/Controllers/Admin/EpisodeController.php +4 −4 Original line number Diff line number Diff line Loading @@ -661,8 +661,8 @@ class EpisodeController extends BaseController $data = [ 'podcast_id' => $this->podcast->id, 'episode_id' => $this->episode->id, 'start_time' => (int) $soundbite['start_time'], 'duration' => (int) $soundbite['duration'], 'start_time' => (float) $soundbite['start_time'], 'duration' => (float) $soundbite['duration'], 'label' => $soundbite['label'], 'updated_by' => user_id(), ]; Loading @@ -688,9 +688,9 @@ class EpisodeController extends BaseController return redirect()->route('soundbites-edit', [$this->podcast->id, $this->episode->id]); } public function soundbiteDelete(int $soundbiteId): RedirectResponse public function soundbiteDelete(string $soundbiteId): RedirectResponse { (new SoundbiteModel())->deleteSoundbite($this->podcast->id, $this->episode->id, $soundbiteId); (new SoundbiteModel())->deleteSoundbite($this->podcast->id, $this->episode->id, (int) $soundbiteId); return redirect()->route('soundbites-edit', [$this->podcast->id, $this->episode->id]); } Loading
app/Controllers/Admin/EpisodePersonController.php +2 −2 Original line number Diff line number Diff line Loading @@ -88,9 +88,9 @@ class EpisodePersonController extends BaseController return redirect()->back(); } public function remove(int $personId): RedirectResponse public function remove(string $personId): RedirectResponse { (new PersonModel())->removePersonFromEpisode($this->podcast->id, $this->episode->id, $personId); (new PersonModel())->removePersonFromEpisode($this->podcast->id, $this->episode->id, (int) $personId); return redirect()->back(); } Loading
app/Controllers/Admin/PodcastController.php +31 −9 Original line number Diff line number Diff line Loading @@ -182,6 +182,15 @@ class PodcastController extends BaseController ->with('errors', $this->validator->getErrors()); } if ( ($partnerId = $this->request->getPost('partner_id')) === '' || ($partnerLinkUrl = $this->request->getPost('partner_link_url')) === '' || ($partnerImageUrl = $this->request->getPost('partner_image_url')) === '') { $partnerId = null; $partnerLinkUrl = null; $partnerImageUrl = null; } $podcast = new Podcast([ 'title' => $this->request->getPost('title'), 'name' => $this->request->getPost('name'), Loading @@ -199,11 +208,13 @@ class PodcastController extends BaseController 'type' => $this->request->getPost('type'), 'copyright' => $this->request->getPost('copyright'), 'location' => new Location($this->request->getPost('location_name'),), 'payment_pointer' => $this->request->getPost('payment_pointer'), 'payment_pointer' => $this->request->getPost( 'payment_pointer' ) === '' ? null : $this->request->getPost('payment_pointer'), 'custom_rss_string' => $this->request->getPost('custom_rss'), 'partner_id' => $this->request->getPost('partner_id'), 'partner_link_url' => $this->request->getPost('partner_link_url'), 'partner_image_url' => $this->request->getPost('partner_image_url'), 'partner_id' => $partnerId, 'partner_link_url' => $partnerLinkUrl, 'partner_image_url' => $partnerImageUrl, 'is_blocked' => $this->request->getPost('block') === 'yes', 'is_completed' => $this->request->getPost('complete') === 'yes', 'is_locked' => $this->request->getPost('lock') === 'yes', Loading @@ -227,7 +238,7 @@ class PodcastController extends BaseController $authorize = Services::authorization(); $podcastAdminGroup = $authorize->group('podcast_admin'); $podcastModel->addPodcastContributor(user_id(), $newPodcastId, $podcastAdminGroup->id); $podcastModel->addPodcastContributor(user_id(), $newPodcastId, (int) $podcastAdminGroup->id); // set Podcast categories (new CategoryModel())->setPodcastCategories( Loading Loading @@ -277,6 +288,15 @@ class PodcastController extends BaseController ->with('errors', $this->validator->getErrors()); } if ( ($partnerId = $this->request->getPost('partner_id')) === '' || ($partnerLinkUrl = $this->request->getPost('partner_link_url')) === '' || ($partnerImageUrl = $this->request->getPost('partner_image_url')) === '') { $partnerId = null; $partnerLinkUrl = null; $partnerImageUrl = null; } $this->podcast->title = $this->request->getPost('title'); $this->podcast->description_markdown = $this->request->getPost('description'); Loading @@ -296,11 +316,13 @@ class PodcastController extends BaseController $this->podcast->type = $this->request->getPost('type'); $this->podcast->copyright = $this->request->getPost('copyright'); $this->podcast->location = new Location($this->request->getPost('location_name')); $this->podcast->payment_pointer = $this->request->getPost('payment_pointer'); $this->podcast->payment_pointer = $this->request->getPost( 'payment_pointer' ) === '' ? null : $this->request->getPost('payment_pointer'); $this->podcast->custom_rss_string = $this->request->getPost('custom_rss'); $this->podcast->partner_id = $this->request->getPost('partner_id'); $this->podcast->partner_link_url = $this->request->getPost('partner_link_url'); $this->podcast->partner_image_url = $this->request->getPost('partner_image_url'); $this->podcast->partner_id = $partnerId; $this->podcast->partner_link_url = $partnerLinkUrl; $this->podcast->partner_image_url = $partnerImageUrl; $this->podcast->is_blocked = $this->request->getPost('block') === 'yes'; $this->podcast->is_completed = $this->request->getPost('complete') === 'yes'; Loading
app/Controllers/Admin/PodcastImportController.php +7 −7 Original line number Diff line number Diff line Loading @@ -197,7 +197,7 @@ class PodcastImportController extends BaseController $authorize = Services::authorization(); $podcastAdminGroup = $authorize->group('podcast_admin'); $podcastModel->addPodcastContributor(user_id(), $newPodcastId, $podcastAdminGroup->id); $podcastModel->addPodcastContributor(user_id(), $newPodcastId, (int) $podcastAdminGroup->id); $podcastsPlatformsData = []; $platformTypes = [ Loading @@ -218,7 +218,7 @@ class PodcastImportController extends BaseController foreach ($platformTypes as $platformType) { foreach ($platformType['elements'] as $platform) { $platformLabel = $platform->attributes()['platform']; $platformSlug = slugify($platformLabel); $platformSlug = slugify((string) $platformLabel); if ($platformModel->getPlatform($platformSlug) !== null) { $podcastsPlatformsData[] = [ 'platform_slug' => $platformSlug, Loading Loading @@ -246,7 +246,7 @@ class PodcastImportController extends BaseController 'full_name' => $fullName, 'unique_name' => slugify($fullName), 'information_url' => $podcastPerson->attributes()['href'], 'image' => new Image(download_file($podcastPerson->attributes()['img'])), 'image' => new Image(download_file((string) $podcastPerson->attributes()['img'])), 'created_by' => user_id(), 'updated_by' => user_id(), ]); Loading Loading @@ -301,7 +301,7 @@ class PodcastImportController extends BaseController $slug = slugify( $this->request->getPost('slug_field') === 'title' ? $item->title ? (string) $item->title : basename($item->link), ); if (in_array($slug, $slugs, true)) { Loading Loading @@ -342,7 +342,7 @@ class PodcastImportController extends BaseController 'guid' => $item->guid ?? null, 'title' => $item->title, 'slug' => $slug, 'audio_file' => download_file($item->enclosure->attributes()['url'],), 'audio_file' => download_file((string) $item->enclosure->attributes()['url'],), 'description_markdown' => $converter->convert($itemDescriptionHtml,), 'description_html' => $itemDescriptionHtml, 'image' => $episodeImage, Loading Loading @@ -372,7 +372,7 @@ class PodcastImportController extends BaseController 'location' => $location, 'created_by' => user_id(), 'updated_by' => user_id(), 'published_at' => strtotime($item->pubDate), 'published_at' => strtotime((string) $item->pubDate), ]); $episodeModel = new EpisodeModel(); Loading @@ -396,7 +396,7 @@ class PodcastImportController extends BaseController 'full_name' => $fullName, 'unique_name' => slugify($fullName), 'information_url' => $episodePerson->attributes()['href'], 'image' => new Image(download_file($episodePerson->attributes()['img'])), 'image' => new Image(download_file((string) $episodePerson->attributes()['img'])), 'created_by' => user_id(), 'updated_by' => user_id(), ]); Loading