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 PodcastPersonController extends BaseController
|
|||
}
|
||||
|
||||
if (
|
||||
($podcast = (new PodcastModel())->getPodcastById((int) $params[0])) instanceof Podcast
|
||||
($podcast = new PodcastModel()->getPodcastById((int) $params[0])) instanceof Podcast
|
||||
) {
|
||||
unset($params[0]);
|
||||
return $this->{$method}($podcast, ...$params);
|
||||
|
|
@ -41,10 +41,13 @@ class PodcastPersonController extends BaseController
|
|||
helper('form');
|
||||
|
||||
$data = [
|
||||
'podcast' => $podcast,
|
||||
'podcastPersons' => (new PersonModel())->getPodcastPersons($podcast->id),
|
||||
'personOptions' => (new PersonModel())->getPersonOptions(),
|
||||
'taxonomyOptions' => (new PersonModel())->getTaxonomyOptions(),
|
||||
'podcast' => $podcast,
|
||||
'podcastPersons' => new PersonModel()
|
||||
->getPodcastPersons($podcast->id),
|
||||
'personOptions' => new PersonModel()
|
||||
->getPersonOptions(),
|
||||
'taxonomyOptions' => new PersonModel()
|
||||
->getTaxonomyOptions(),
|
||||
];
|
||||
|
||||
$this->setHtmlHead(lang('Person.podcast_form.title'));
|
||||
|
|
@ -69,18 +72,16 @@ class PodcastPersonController extends BaseController
|
|||
|
||||
$validData = $this->validator->getValidated();
|
||||
|
||||
(new PersonModel())->addPodcastPersons(
|
||||
$podcast->id,
|
||||
$validData['persons'],
|
||||
$this->request->getPost('roles') ?? [],
|
||||
);
|
||||
new PersonModel()
|
||||
->addPodcastPersons($podcast->id, $validData['persons'], $this->request->getPost('roles') ?? []);
|
||||
|
||||
return redirect()->back();
|
||||
}
|
||||
|
||||
public function deleteAction(Podcast $podcast, string $personId): RedirectResponse
|
||||
{
|
||||
(new PersonModel())->removePersonFromPodcast($podcast->id, (int) $personId);
|
||||
new PersonModel()
|
||||
->removePersonFromPodcast($podcast->id, (int) $personId);
|
||||
|
||||
return redirect()->back();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue