Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
feeds
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor 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
drupal.org
feeds
Commits
a3cfd971
Commit
a3cfd971
authored
15 years ago
by
Alex Barth
Browse files
Options
Downloads
Patches
Plain Diff
#622654 hefox: Don't show body as option for mapper when body is disabled.
parent
949ac40c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
plugins/FeedsNodeProcessor.inc
+12
-5
12 additions, 5 deletions
plugins/FeedsNodeProcessor.inc
with
12 additions
and
5 deletions
plugins/FeedsNodeProcessor.inc
+
12
−
5
View file @
a3cfd971
...
@@ -231,6 +231,17 @@ class FeedsNodeProcessor extends FeedsProcessor {
...
@@ -231,6 +231,17 @@ class FeedsNodeProcessor extends FeedsProcessor {
'name'
=>
t
(
'Title'
),
'name'
=>
t
(
'Title'
),
'description'
=>
t
(
'The title of the node.'
),
'description'
=>
t
(
'The title of the node.'
),
),
),
);
// Include body field only if available.
$type
=
node_get_types
(
'type'
,
$this
->
config
[
'content_type'
]);
if
(
$type
->
has_body
)
{
// Using 'teaser' instead of 'body' forces entire content above the break.
$targets
[
'body'
]
=
array
(
'name'
=>
t
(
'Body'
),
'description'
=>
t
(
'The body of the node. The teaser will be the same as the entire body.'
),
);
}
$targets
+=
array
(
'status'
=>
array
(
'status'
=>
array
(
'name'
=>
t
(
'Published status'
),
'name'
=>
t
(
'Published status'
),
'description'
=>
t
(
'Whether a node is published or not. 1 stands for published, 0 for not published.'
),
'description'
=>
t
(
'Whether a node is published or not. 1 stands for published, 0 for not published.'
),
...
@@ -239,11 +250,6 @@ class FeedsNodeProcessor extends FeedsProcessor {
...
@@ -239,11 +250,6 @@ class FeedsNodeProcessor extends FeedsProcessor {
'name'
=>
t
(
'Published date'
),
'name'
=>
t
(
'Published date'
),
'description'
=>
t
(
'The UNIX time when a node has been published.'
),
'description'
=>
t
(
'The UNIX time when a node has been published.'
),
),
),
// Using 'teaser' instead of 'body' forces entire content above the break.
'body'
=>
array
(
'name'
=>
t
(
'Body'
),
'description'
=>
t
(
'The body of the node. The teaser will be the same as the entire body.'
),
),
'url'
=>
array
(
'url'
=>
array
(
'name'
=>
t
(
'URL'
),
'name'
=>
t
(
'URL'
),
'description'
=>
t
(
'The external URL of the node. E. g. the feed item URL in the case of a syndication feed. May be unique.'
),
'description'
=>
t
(
'The external URL of the node. E. g. the feed item URL in the case of a syndication feed. May be unique.'
),
...
@@ -256,6 +262,7 @@ class FeedsNodeProcessor extends FeedsProcessor {
...
@@ -256,6 +262,7 @@ class FeedsNodeProcessor extends FeedsProcessor {
),
),
);
);
// Let other modules expose mapping targets.
self
::
loadMappers
();
self
::
loadMappers
();
drupal_alter
(
'feeds_node_processor_targets'
,
$targets
,
$this
->
config
[
'content_type'
]);
drupal_alter
(
'feeds_node_processor_targets'
,
$targets
,
$this
->
config
[
'content_type'
]);
...
...
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