mirror of
https://github.com/ad-aures/castopod.git
synced 2026-04-04 07:19:03 +02:00
chore: update CI to v4.6.3 + all php and js dependencies
This commit is contained in:
parent
96b2df15b0
commit
346c00e7b5
206 changed files with 6239 additions and 5336 deletions
|
|
@ -27,7 +27,7 @@ class EpisodePersonController extends BaseController
|
|||
}
|
||||
|
||||
if (count($params) === 1) {
|
||||
if (! ($podcast = (new PodcastModel())->getPodcastById((int) $params[0])) instanceof Podcast) {
|
||||
if (! ($podcast = new PodcastModel()->getPodcastById((int) $params[0])) instanceof Podcast) {
|
||||
throw PageNotFoundException::forPageNotFound();
|
||||
}
|
||||
|
||||
|
|
@ -35,7 +35,7 @@ class EpisodePersonController extends BaseController
|
|||
}
|
||||
|
||||
if (
|
||||
! ($episode = (new EpisodeModel())->getEpisodeById((int) $params[1])) instanceof Episode
|
||||
! ($episode = new EpisodeModel()->getEpisodeById((int) $params[1])) instanceof Episode
|
||||
) {
|
||||
throw PageNotFoundException::forPageNotFound();
|
||||
}
|
||||
|
|
@ -51,10 +51,12 @@ class EpisodePersonController extends BaseController
|
|||
helper('form');
|
||||
|
||||
$data = [
|
||||
'episode' => $episode,
|
||||
'podcast' => $episode->podcast,
|
||||
'personOptions' => (new PersonModel())->getPersonOptions(),
|
||||
'taxonomyOptions' => (new PersonModel())->getTaxonomyOptions(),
|
||||
'episode' => $episode,
|
||||
'podcast' => $episode->podcast,
|
||||
'personOptions' => new PersonModel()
|
||||
->getPersonOptions(),
|
||||
'taxonomyOptions' => new PersonModel()
|
||||
->getTaxonomyOptions(),
|
||||
];
|
||||
|
||||
$this->setHtmlHead(lang('Person.episode_form.title'));
|
||||
|
|
@ -80,19 +82,21 @@ class EpisodePersonController extends BaseController
|
|||
|
||||
$validData = $this->validator->getValidated();
|
||||
|
||||
(new PersonModel())->addEpisodePersons(
|
||||
$episode->podcast_id,
|
||||
$episode->id,
|
||||
$validData['persons'],
|
||||
$this->request->getPost('roles') ?? [],
|
||||
);
|
||||
new PersonModel()
|
||||
->addEpisodePersons(
|
||||
$episode->podcast_id,
|
||||
$episode->id,
|
||||
$validData['persons'],
|
||||
$this->request->getPost('roles') ?? [],
|
||||
);
|
||||
|
||||
return redirect()->back();
|
||||
}
|
||||
|
||||
public function deleteAction(Episode $episode, string $personId): RedirectResponse
|
||||
{
|
||||
(new PersonModel())->removePersonFromEpisode($episode->podcast_id, $episode->id, (int) $personId);
|
||||
new PersonModel()
|
||||
->removePersonFromEpisode($episode->podcast_id, $episode->id, (int) $personId);
|
||||
|
||||
return redirect()->back();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue