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
fbedb3fb
Commit
fbedb3fb
authored
11 years ago
by
Chris Leppanen
Browse files
Options
Downloads
Patches
Plain Diff
Allow 0 as a term name.
parent
f288fbcc
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
mappers/taxonomy.inc
+3
-1
3 additions, 1 deletion
mappers/taxonomy.inc
plugins/FeedsTermProcessor.inc
+1
-1
1 addition, 1 deletion
plugins/FeedsTermProcessor.inc
with
4 additions
and
2 deletions
mappers/taxonomy.inc
+
3
−
1
View file @
fbedb3fb
...
@@ -78,7 +78,9 @@ function taxonomy_feeds_processor_targets_alter(&$targets, $entity_type, $bundle
...
@@ -78,7 +78,9 @@ function taxonomy_feeds_processor_targets_alter(&$targets, $entity_type, $bundle
* @todo Do not create new terms for non-autotag fields.
* @todo Do not create new terms for non-autotag fields.
*/
*/
function
taxonomy_feeds_set_target
(
$source
,
$entity
,
$target
,
$terms
,
$mapping
=
array
())
{
function
taxonomy_feeds_set_target
(
$source
,
$entity
,
$target
,
$terms
,
$mapping
=
array
())
{
if
(
empty
(
$terms
))
{
// Allow mapping the string '0' to a term name.
if
(
empty
(
$terms
)
&&
$terms
!=
0
)
{
return
;
return
;
}
}
...
...
This diff is collapsed.
Click to expand it.
plugins/FeedsTermProcessor.inc
+
1
−
1
View file @
fbedb3fb
...
@@ -42,7 +42,7 @@ class FeedsTermProcessor extends FeedsProcessor {
...
@@ -42,7 +42,7 @@ class FeedsTermProcessor extends FeedsProcessor {
* Validates a term.
* Validates a term.
*/
*/
protected
function
entityValidate
(
$term
)
{
protected
function
entityValidate
(
$term
)
{
if
(
empty
(
$term
->
name
))
{
if
(
drupal_strlen
(
$term
->
name
)
==
0
)
{
throw
new
FeedsValidationException
(
t
(
'Term name missing.'
));
throw
new
FeedsValidationException
(
t
(
'Term name missing.'
));
}
}
}
}
...
...
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