Loading app/Config/Autoload.php +16 −1 Original line number Diff line number Diff line Loading @@ -55,7 +55,6 @@ class Autoload extends AutoloadConfig 'Modules\PremiumPodcasts' => ROOTPATH . 'modules/PremiumPodcasts/', 'Modules\Update' => ROOTPATH . 'modules/Update/', 'Modules\WebSub' => ROOTPATH . 'modules/WebSub/', 'Plugins' => ROOTPATH . 'plugins', 'Themes' => ROOTPATH . 'themes', 'ViewComponents' => APPPATH . 'Libraries/ViewComponents/', 'ViewThemes' => APPPATH . 'Libraries/ViewThemes/', Loading Loading @@ -111,4 +110,20 @@ class Autoload extends AutoloadConfig * @var list<string> */ public $helpers = ['auth', 'setting', 'icons']; public function __construct() { // load plugins namespaces $pluginsPaths = glob(ROOTPATH . '/plugins/*', GLOB_ONLYDIR); if (! $pluginsPaths) { $pluginsPaths = []; } foreach ($pluginsPaths as $pluginPath) { $this->psr4[sprintf('Plugins\%s', basename($pluginPath))] = $pluginPath; } parent::__construct(); } } app/Helpers/rss_helper.php +7 −2 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ use CodeIgniter\I18n\Time; use Config\Mimes; use Modules\Media\Entities\Chapters; use Modules\Media\Entities\Transcript; use Modules\Plugins\Plugins; use Modules\PremiumPodcasts\Entities\Subscription; if (! function_exists('get_rss_feed')) { Loading @@ -31,6 +32,7 @@ if (! function_exists('get_rss_feed')) { Subscription $subscription = null, string $token = null ): string { /** @var Plugins $plugins */ $plugins = service('plugins'); $episodes = $podcast->episodes; Loading Loading @@ -71,8 +73,6 @@ if (! function_exists('get_rss_feed')) { $channel->addChild('generator', 'Castopod - https://castopod.org/'); $channel->addChild('docs', 'https://cyber.harvard.edu/rss/rss.html'); $plugins->runHook('setChannelTag', [$podcast, $channel]); if ($podcast->guid === '') { // FIXME: guid shouldn't be empty here as it should be filled upon Podcast creation $uuid = service('uuid'); Loading Loading @@ -297,6 +297,9 @@ if (! function_exists('get_rss_feed')) { ], $channel); } // run plugins hook at the end $plugins->setChannelTag($podcast, $channel); foreach ($episodes as $episode) { if ($episode->is_premium && ! $subscription instanceof Subscription) { continue; Loading Loading @@ -456,6 +459,8 @@ if (! function_exists('get_rss_feed')) { 'elements' => $episode->custom_rss, ], $item); } $plugins->setItemTag($episode, $item); } return $rss->asXML(); Loading modules/Admin/Language/en/Breadcrumb.php +1 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ return [ 'add' => 'add', 'new' => 'new', 'edit' => 'edit', 'plugins' => 'plugins', 'persons' => 'persons', 'publish' => 'publish', 'publish-edit' => 'edit publication', Loading modules/Admin/Language/en/Navigation.php +2 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,8 @@ return [ 'podcast-create' => 'New podcast', 'all-podcast-imports' => 'All Podcast imports', 'podcast-imports-add' => 'Import a podcast', 'plugins' => 'Plugins', 'plugins-installed' => 'Installed', 'persons' => 'Persons', 'person-list' => 'All persons', 'person-create' => 'New person', Loading modules/Auth/Config/AuthGroups.php +2 −0 Original line number Diff line number Diff line Loading @@ -107,6 +107,7 @@ class AuthGroups extends ShieldAuthGroups public array $instanceBasePermissions = [ 'admin.access', 'admin.settings', 'plugins.manage', 'users.manage', 'persons.manage', 'pages.manage', Loading @@ -122,6 +123,7 @@ class AuthGroups extends ShieldAuthGroups public array $instanceMatrix = [ 'superadmin' => [ 'admin.*', 'plugins.*', 'podcasts.*', 'users.manage', 'persons.manage', Loading Loading
app/Config/Autoload.php +16 −1 Original line number Diff line number Diff line Loading @@ -55,7 +55,6 @@ class Autoload extends AutoloadConfig 'Modules\PremiumPodcasts' => ROOTPATH . 'modules/PremiumPodcasts/', 'Modules\Update' => ROOTPATH . 'modules/Update/', 'Modules\WebSub' => ROOTPATH . 'modules/WebSub/', 'Plugins' => ROOTPATH . 'plugins', 'Themes' => ROOTPATH . 'themes', 'ViewComponents' => APPPATH . 'Libraries/ViewComponents/', 'ViewThemes' => APPPATH . 'Libraries/ViewThemes/', Loading Loading @@ -111,4 +110,20 @@ class Autoload extends AutoloadConfig * @var list<string> */ public $helpers = ['auth', 'setting', 'icons']; public function __construct() { // load plugins namespaces $pluginsPaths = glob(ROOTPATH . '/plugins/*', GLOB_ONLYDIR); if (! $pluginsPaths) { $pluginsPaths = []; } foreach ($pluginsPaths as $pluginPath) { $this->psr4[sprintf('Plugins\%s', basename($pluginPath))] = $pluginPath; } parent::__construct(); } }
app/Helpers/rss_helper.php +7 −2 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ use CodeIgniter\I18n\Time; use Config\Mimes; use Modules\Media\Entities\Chapters; use Modules\Media\Entities\Transcript; use Modules\Plugins\Plugins; use Modules\PremiumPodcasts\Entities\Subscription; if (! function_exists('get_rss_feed')) { Loading @@ -31,6 +32,7 @@ if (! function_exists('get_rss_feed')) { Subscription $subscription = null, string $token = null ): string { /** @var Plugins $plugins */ $plugins = service('plugins'); $episodes = $podcast->episodes; Loading Loading @@ -71,8 +73,6 @@ if (! function_exists('get_rss_feed')) { $channel->addChild('generator', 'Castopod - https://castopod.org/'); $channel->addChild('docs', 'https://cyber.harvard.edu/rss/rss.html'); $plugins->runHook('setChannelTag', [$podcast, $channel]); if ($podcast->guid === '') { // FIXME: guid shouldn't be empty here as it should be filled upon Podcast creation $uuid = service('uuid'); Loading Loading @@ -297,6 +297,9 @@ if (! function_exists('get_rss_feed')) { ], $channel); } // run plugins hook at the end $plugins->setChannelTag($podcast, $channel); foreach ($episodes as $episode) { if ($episode->is_premium && ! $subscription instanceof Subscription) { continue; Loading Loading @@ -456,6 +459,8 @@ if (! function_exists('get_rss_feed')) { 'elements' => $episode->custom_rss, ], $item); } $plugins->setItemTag($episode, $item); } return $rss->asXML(); Loading
modules/Admin/Language/en/Breadcrumb.php +1 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ return [ 'add' => 'add', 'new' => 'new', 'edit' => 'edit', 'plugins' => 'plugins', 'persons' => 'persons', 'publish' => 'publish', 'publish-edit' => 'edit publication', Loading
modules/Admin/Language/en/Navigation.php +2 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,8 @@ return [ 'podcast-create' => 'New podcast', 'all-podcast-imports' => 'All Podcast imports', 'podcast-imports-add' => 'Import a podcast', 'plugins' => 'Plugins', 'plugins-installed' => 'Installed', 'persons' => 'Persons', 'person-list' => 'All persons', 'person-create' => 'New person', Loading
modules/Auth/Config/AuthGroups.php +2 −0 Original line number Diff line number Diff line Loading @@ -107,6 +107,7 @@ class AuthGroups extends ShieldAuthGroups public array $instanceBasePermissions = [ 'admin.access', 'admin.settings', 'plugins.manage', 'users.manage', 'persons.manage', 'pages.manage', Loading @@ -122,6 +123,7 @@ class AuthGroups extends ShieldAuthGroups public array $instanceMatrix = [ 'superadmin' => [ 'admin.*', 'plugins.*', 'podcasts.*', 'users.manage', 'persons.manage', Loading