mirror of
https://github.com/ad-aures/castopod.git
synced 2026-04-11 10:46:43 +02:00
feat(plugins): add html field type + CodeEditor component + rework html head generation
update php and js packages to latest
This commit is contained in:
parent
b869acb3a9
commit
8cf9c6dc83
227 changed files with 2991 additions and 2988 deletions
|
|
@ -45,6 +45,7 @@ class PostController extends FediversePostController
|
|||
#[Override]
|
||||
public function _remap(string $method, string ...$params): mixed
|
||||
{
|
||||
|
||||
if (
|
||||
! ($podcast = (new PodcastModel())->getPodcastByHandle($params[0])) instanceof Podcast
|
||||
) {
|
||||
|
|
@ -54,16 +55,21 @@ class PostController extends FediversePostController
|
|||
$this->podcast = $podcast;
|
||||
$this->actor = $this->podcast->actor;
|
||||
|
||||
if (
|
||||
count($params) > 1 &&
|
||||
($post = (new PostModel())->getPostById($params[1])) instanceof CastopodPost
|
||||
) {
|
||||
$this->post = $post;
|
||||
|
||||
unset($params[0]);
|
||||
unset($params[1]);
|
||||
if (count($params) <= 1) {
|
||||
throw PageNotFoundException::forPageNotFound();
|
||||
}
|
||||
|
||||
if (
|
||||
! ($post = (new PostModel())->getPostById($params[1])) instanceof CastopodPost
|
||||
) {
|
||||
throw PageNotFoundException::forPageNotFound();
|
||||
}
|
||||
|
||||
$this->post = $post;
|
||||
|
||||
unset($params[0]);
|
||||
unset($params[1]);
|
||||
|
||||
return $this->{$method}(...$params);
|
||||
}
|
||||
|
||||
|
|
@ -74,10 +80,6 @@ class PostController extends FediversePostController
|
|||
$this->registerPodcastWebpageHit($this->podcast->id);
|
||||
}
|
||||
|
||||
if (! $this->post instanceof CastopodPost) {
|
||||
throw PageNotFoundException::forPageNotFound();
|
||||
}
|
||||
|
||||
$cacheName = implode(
|
||||
'_',
|
||||
array_filter([
|
||||
|
|
@ -91,10 +93,10 @@ class PostController extends FediversePostController
|
|||
);
|
||||
|
||||
if (! ($cachedView = cache($cacheName))) {
|
||||
set_post_metatags($this->post);
|
||||
$data = [
|
||||
'metatags' => get_post_metatags($this->post),
|
||||
'post' => $this->post,
|
||||
'podcast' => $this->podcast,
|
||||
'post' => $this->post,
|
||||
'podcast' => $this->podcast,
|
||||
];
|
||||
|
||||
// if user is logged in then send to the authenticated activity view
|
||||
|
|
@ -254,12 +256,12 @@ class PostController extends FediversePostController
|
|||
$this->registerPodcastWebpageHit($this->podcast->id);
|
||||
}
|
||||
|
||||
set_remote_actions_metatags($this->post, $action);
|
||||
$data = [
|
||||
'metatags' => get_remote_actions_metatags($this->post, $action),
|
||||
'podcast' => $this->podcast,
|
||||
'actor' => $this->actor,
|
||||
'post' => $this->post,
|
||||
'action' => $action,
|
||||
'podcast' => $this->podcast,
|
||||
'actor' => $this->actor,
|
||||
'post' => $this->post,
|
||||
'action' => $action,
|
||||
];
|
||||
|
||||
helper('form');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue