summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Barth2010-10-05 20:48:10 (GMT)
committer Alex Barth2010-10-05 20:48:10 (GMT)
commitce982ca48173b206ffb439dd5a03e14c2b156847 (patch)
treeb18a9320d5258a05ec647f5e52abb74527cf120e
parent9af06217d94d71547aa815c61ca4aeee0cd4aa3b (diff)
Remove check for present name in terms that are imported. If we do such validation, we need to do this on a more pluggable level.
-rw-r--r--CHANGELOG.txt2
-rw-r--r--plugins/FeedsTermProcessor.inc19
2 files changed, 3 insertions, 18 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 6c88cd0..cd99625 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -3,6 +3,8 @@
Feeds 7.x 2.0 XXXXXXXXXXXXXXXXXXX
---------------------------------
+- Remove check for present name in terms that are imported. If we do such
+ validation, we need to do this on a more pluggable level.
- Fix Feeds News tests, add a 'description' field to the Feeds Item content
type.
- #728534 alex_b: Remove FeedsFeedNodeProcessor. If you have used
diff --git a/plugins/FeedsTermProcessor.inc b/plugins/FeedsTermProcessor.inc
index 584531d..a63702e 100644
--- a/plugins/FeedsTermProcessor.inc
+++ b/plugins/FeedsTermProcessor.inc
@@ -23,7 +23,7 @@ class FeedsTermProcessor extends FeedsProcessor {
*/
public function process(FeedsSource $source, FeedsParserResult $parser_result) {
// Count number of created and updated nodes.
- $created = $updated = $no_name = 0;
+ $created = $updated = 0;
while ($item = $parser_result->shiftItem()) {
if (!($tid = $this->existingItemId($source, $parser_result)) || $this->config['update_existing'] != FEEDS_SKIP_EXISTING) {
@@ -37,12 +37,6 @@ class FeedsTermProcessor extends FeedsProcessor {
}
$term = $this->map($source, $parser_result, $term);
- // Check if term name is set, otherwise continue.
- if (empty($term->name)) {
- $no_name++;
- continue;
- }
-
// Add term id if available.
if (!empty($tid)) {
$term->tid = $tid;
@@ -63,17 +57,6 @@ class FeedsTermProcessor extends FeedsProcessor {
// Set messages.
$vocabulary = $this->vocabulary();
- if ($no_name) {
- drupal_set_message(
- format_plural(
- $no_name,
- 'There was @number term that could not be imported because their name was empty. Check mapping settings on Taxomy term processor.',
- 'There were @number terms that could not be imported because their name was empty. Check mapping settings on Taxomy term processor.',
- array('@number' => $no_name)
- ),
- 'error'
- );
- }
if ($created) {
drupal_set_message(format_plural($created, 'Created @number term in !vocabulary.', 'Created @number terms in !vocabulary.', array('@number' => $created, '!vocabulary' => $vocabulary->name)));
}