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
Container registry
Model registry
Operate
Environments
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
Ad Aures
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
No related tags found
2 merge requests
!160
WIP:Feat/social interact
,
!150
fix(ux): enhance user experience
Pipeline
#1217
passed
3 years ago
Stage: prepare
Stage: quality
Stage: bundle
Changes
2
Pipelines
1
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.
Yassine Doghri
@yassinedoghri
mentioned in commit
d807ab97
·
3 years ago
mentioned in commit
d807ab97
mentioned in commit d807ab9732d8e4ad1eae956f0b728f8a5c0f868d
Toggle commit list
Yassine Doghri
@yassinedoghri
mentioned in commit
f9572e41
·
2 years ago
mentioned in commit
f9572e41
mentioned in commit f9572e4125ed53c215cc4a3c4d1a32708e6febe3
Toggle commit list
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