mirror of
https://github.com/ad-aures/castopod.git
synced 2026-04-13 03:27:45 +02:00
fix(premium-podcasts): display unlock button in embed when premium episode
This commit is contained in:
parent
242352c4d9
commit
ca109ba3a8
5 changed files with 24 additions and 6 deletions
|
|
@ -177,10 +177,19 @@ class EpisodeController extends BaseController
|
|||
$session->set('embed_domain', parse_url($_SERVER['HTTP_REFERER'], PHP_URL_HOST));
|
||||
}
|
||||
|
||||
$locale = service('request')
|
||||
->getLocale();
|
||||
|
||||
$cacheName = "page_podcast#{$this->podcast->id}_episode#{$this->episode->id}_embed_{$theme}_{$locale}";
|
||||
$cacheName = implode(
|
||||
'_',
|
||||
array_filter([
|
||||
'page',
|
||||
"podcast#{$this->podcast->id}",
|
||||
"episode#{$this->episode->id}",
|
||||
'embed',
|
||||
$theme,
|
||||
service('request')
|
||||
->getLocale(),
|
||||
is_unlocked($this->podcast->handle) ? 'unlocked' : null,
|
||||
]),
|
||||
);
|
||||
|
||||
if (! ($cachedView = cache($cacheName))) {
|
||||
$themeData = EpisodeModel::$themes[$theme];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue