Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
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
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Commits
226a01e2
Commit
226a01e2
authored
13 years ago
by
Dries Buytaert
Browse files
Options
Downloads
Patches
Plain Diff
- Patch
#1268234
by derjochenmeyer: move out rendering image from aggregator parser.
parent
8df7795d
No related branches found
No related tags found
2 merge requests
!7452
Issue #1797438. HTML5 validation is preventing form submit and not fully...
,
!789
Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/aggregator/aggregator.pages.inc
+8
-1
8 additions, 1 deletion
modules/aggregator/aggregator.pages.inc
modules/aggregator/aggregator.parser.inc
+3
-10
3 additions, 10 deletions
modules/aggregator/aggregator.parser.inc
with
11 additions
and
11 deletions
modules/aggregator/aggregator.pages.inc
+
8
−
1
View file @
226a01e2
...
...
@@ -507,7 +507,14 @@ function template_preprocess_aggregator_feed_source(&$variables) {
$feed
=
$variables
[
'feed'
];
$variables
[
'source_icon'
]
=
theme
(
'feed_icon'
,
array
(
'url'
=>
$feed
->
url
,
'title'
=>
t
(
'!title feed'
,
array
(
'!title'
=>
$feed
->
title
))));
$variables
[
'source_image'
]
=
$feed
->
image
;
if
(
!
empty
(
$feed
->
image
)
&&
!
empty
(
$feed
->
title
)
&&
!
empty
(
$feed
->
link
))
{
$variables
[
'source_image'
]
=
l
(
theme
(
'image'
,
array
(
'path'
=>
$feed
->
image
,
'alt'
=>
$feed
->
title
)),
$feed
->
link
,
array
(
'html'
=>
TRUE
,
'attributes'
=>
array
(
'class'
=>
'feed-image'
)));
}
else
{
$variables
[
'source_image'
]
=
''
;
}
$variables
[
'source_description'
]
=
aggregator_filter_xss
(
$feed
->
description
);
$variables
[
'source_url'
]
=
check_url
(
url
(
$feed
->
link
,
array
(
'absolute'
=>
TRUE
)));
...
...
This diff is collapsed.
Click to expand it.
modules/aggregator/aggregator.parser.inc
+
3
−
10
View file @
226a01e2
...
...
@@ -35,19 +35,12 @@ function aggregator_aggregator_parse($feed) {
$image
[
$key
]
=
trim
(
$value
);
}
if
(
!
empty
(
$image
[
'link'
])
&&
!
empty
(
$image
[
'url'
])
&&
!
empty
(
$image
[
'title'
]))
{
$image
=
l
(
theme
(
'image'
,
array
(
'path'
=>
$image
[
'url'
],
'alt'
=>
$image
[
'title'
])),
$image
[
'link'
],
array
(
'html'
=>
TRUE
));
}
else
{
$image
=
''
;
}
$etag
=
empty
(
$feed
->
http_headers
[
'etag'
])
?
''
:
$feed
->
http_headers
[
'etag'
];
// Add parsed data to the feed object.
$feed
->
link
=
!
empty
(
$channel
[
'
LINK
'
])
?
$channel
[
'
LINK
'
]
:
''
;
$feed
->
description
=
!
empty
(
$channel
[
'
DESCRIPTION
'
])
?
$channel
[
'
DESCRIPTION
'
]
:
''
;
$feed
->
image
=
$image
;
$feed
->
link
=
!
empty
(
$channel
[
'
link
'
])
?
$channel
[
'
link
'
]
:
''
;
$feed
->
description
=
!
empty
(
$channel
[
'
description
'
])
?
$channel
[
'
description
'
]
:
''
;
$feed
->
image
=
!
empty
(
$image
[
'url'
])
?
$image
[
'url'
]
:
''
;
$feed
->
etag
=
$etag
;
$feed
->
modified
=
$modified
;
...
...
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