Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Castopod
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Albatroz Jeremias
Castopod
Commits
482b47ba
Commit
482b47ba
authored
3 years ago
by
Yassine Doghri
Browse files
Options
Downloads
Patches
Plain Diff
fix: redirect to non cached views when authenticated in public views
parent
c1581c1f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/Controllers/EpisodeController.php
+5
-0
5 additions, 0 deletions
app/Controllers/EpisodeController.php
app/Controllers/PodcastController.php
+8
-0
8 additions, 0 deletions
app/Controllers/PodcastController.php
with
13 additions
and
0 deletions
app/Controllers/EpisodeController.php
+
5
−
0
View file @
482b47ba
...
...
@@ -89,7 +89,10 @@ class EpisodeController extends BaseController
if
(
can_user_interact
())
{
helper
(
'form'
);
return
view
(
'episode/comments'
,
$data
);
}
// The page cache is set to a decade so it is deleted manually upon podcast update
return
view
(
'episode/comments'
,
$data
,
[
'cache'
=>
$secondsToNextUnpublishedEpisode
...
...
@@ -128,6 +131,8 @@ class EpisodeController extends BaseController
if
(
can_user_interact
())
{
helper
(
'form'
);
return
view
(
'episode/activity'
,
$data
);
}
// The page cache is set to a decade so it is deleted manually upon podcast update
return
view
(
'episode/activity'
,
$data
,
[
...
...
This diff is collapsed.
Click to expand it.
app/Controllers/PodcastController.php
+
8
−
0
View file @
482b47ba
...
...
@@ -88,6 +88,8 @@ class PodcastController extends BaseController
// if user is logged in then send to the authenticated activity view
if
(
can_user_interact
())
{
helper
(
'form'
);
return
view
(
'podcast/activity'
,
$data
);
}
$secondsToNextUnpublishedEpisode
=
(
new
EpisodeModel
())
->
getSecondsToNextUnpublishedEpisode
(
...
...
@@ -136,6 +138,8 @@ class PodcastController extends BaseController
// // if user is logged in then send to the authenticated activity view
if
(
can_user_interact
())
{
helper
(
'form'
);
return
view
(
'podcast/about'
,
$data
);
}
$secondsToNextUnpublishedEpisode
=
(
new
EpisodeModel
())
->
getSecondsToNextUnpublishedEpisode
(
...
...
@@ -257,6 +261,10 @@ class PodcastController extends BaseController
),
];
if
(
can_user_interact
())
{
return
view
(
'podcast/episodes'
,
$data
);
}
$secondsToNextUnpublishedEpisode
=
(
new
EpisodeModel
())
->
getSecondsToNextUnpublishedEpisode
(
$this
->
podcast
->
id
,
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment