Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
views_rss
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
views_rss
Commits
14b35e5a
Commit
14b35e5a
authored
Jun 16, 2023
by
Damien McKenna
Committed by
Damien McKenna
Jun 16, 2023
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3367232
by DamienMcKenna: A better location for the absolute URL logic.
parent
47c68e27
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.txt
+1
-0
1 addition, 0 deletions
CHANGELOG.txt
modules/views_rss_media/views_rss_media.inc
+5
-5
5 additions, 5 deletions
modules/views_rss_media/views_rss_media.inc
with
6 additions
and
5 deletions
CHANGELOG.txt
+
1
−
0
View file @
14b35e5a
...
...
@@ -7,6 +7,7 @@ Advanced Views RSS Feed 8.x-2.x-dev, 2022-xx-xx
#3366701 by DamienMcKenna: Fix tests in D10.0.
#3366793 by DamienMcKenna: Fix channel pubDate value on Drupal 10.1.
#3367232 by DamienMcKenna: media:thumbnail URL should be absolute.
#3367232 by DamienMcKenna: A better location for the absolute URL logic.
Advanced Views RSS Feed 8.x-2.0, 2023-06-14
...
...
This diff is collapsed.
Click to expand it.
modules/views_rss_media/views_rss_media.inc
+
5
−
5
View file @
14b35e5a
...
...
@@ -138,11 +138,6 @@ function views_rss_media_preprocess_item_thumbnail(&$variables) {
$element
[
'attributes'
][
'width'
]
=
$matches
[
2
];
$element
[
'attributes'
][
'height'
]
=
$matches
[
3
];
// Convert the URL to an absolute path.
if
(
strpos
(
$element
[
'attributes'
][
'url'
],
'/'
)
===
0
)
{
$element
[
'attributes'
][
'url'
]
=
$GLOBALS
[
'base_url'
]
.
$element
[
'attributes'
][
'url'
];
}
// @todo Work out a better location for this.
// @code
// $element['attributes']['title'] = $matches[4];
...
...
@@ -156,6 +151,11 @@ function views_rss_media_preprocess_item_thumbnail(&$variables) {
$element
[
'attributes'
][
'url'
]
=
$item
[
'rendered'
][
'#markup'
];
}
// Convert the URL to an absolute path.
if
(
strpos
(
$element
[
'attributes'
][
'url'
],
'/'
)
===
0
)
{
$element
[
'attributes'
][
'url'
]
=
$GLOBALS
[
'base_url'
]
.
$element
[
'attributes'
][
'url'
];
}
$variables
[
'elements'
][]
=
$element
;
}
}
...
...
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