mirror of
https://github.com/ad-aures/castopod.git
synced 2026-04-14 12:07:46 +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
|
|
@ -105,7 +105,8 @@ class PluginController extends BaseController
|
|||
];
|
||||
|
||||
if ($podcastId !== null) {
|
||||
$podcast = (new PodcastModel())->getPodcastById((int) $podcastId);
|
||||
$podcast = new PodcastModel()
|
||||
->getPodcastById((int) $podcastId);
|
||||
|
||||
if (! $podcast instanceof Podcast) {
|
||||
throw PageNotFoundException::forPageNotFound();
|
||||
|
|
@ -118,7 +119,8 @@ class PluginController extends BaseController
|
|||
}
|
||||
|
||||
if ($episodeId !== null) {
|
||||
$episode = (new EpisodeModel())->getEpisodeById((int) $episodeId);
|
||||
$episode = new EpisodeModel()
|
||||
->getEpisodeById((int) $episodeId);
|
||||
|
||||
if (! $episode instanceof Episode) {
|
||||
throw PageNotFoundException::forPageNotFound();
|
||||
|
|
|
|||
|
|
@ -358,7 +358,8 @@ abstract class BasePlugin implements PluginInterface
|
|||
$environment = new Environment([
|
||||
'html_input' => 'escape',
|
||||
'allow_unsafe_links' => false,
|
||||
'host' => (new URI(base_url()))->getHost(),
|
||||
'host' => new URI(base_url())
|
||||
->getHost(),
|
||||
]);
|
||||
$environment->addExtension(new CommonMarkCoreExtension());
|
||||
|
||||
|
|
@ -368,13 +369,15 @@ abstract class BasePlugin implements PluginInterface
|
|||
$environment->addEventListener(
|
||||
DocumentParsedEvent::class,
|
||||
static function (DocumentParsedEvent $event): void {
|
||||
(new ExternalLinkProcessor())->onDocumentParsed($event);
|
||||
new ExternalLinkProcessor()
|
||||
->onDocumentParsed($event);
|
||||
},
|
||||
);
|
||||
$environment->addEventListener(
|
||||
DocumentParsedEvent::class,
|
||||
static function (DocumentParsedEvent $event): void {
|
||||
(new ExternalImageProcessor())->onDocumentParsed($event);
|
||||
new ExternalImageProcessor()
|
||||
->onDocumentParsed($event);
|
||||
},
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ class ExternalImageProcessor
|
|||
$host = parse_url($url, PHP_URL_HOST);
|
||||
|
||||
// TODO: load from environment's config
|
||||
return $host !== (new URI(base_url()))->getHost();
|
||||
return $host !== new URI(base_url())
|
||||
->getHost();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ class ExternalLinkProcessor
|
|||
$host = parse_url($url, PHP_URL_HOST);
|
||||
|
||||
// TODO: load from environment's config
|
||||
return $host !== (new URI(base_url()))->getHost();
|
||||
return $host !== new URI(base_url())
|
||||
->getHost();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue