From 11d6882ca4e0ab344ac7ad245148868d607fbba5 Mon Sep 17 00:00:00 2001
From: Alex Barth <alex_b@53995.no-reply.drupal.org>
Date: Wed, 28 Apr 2010 22:18:30 +0000
Subject: [PATCH] More filtering of innocent output.

---
 plugins/FeedsDataProcessor.inc     |  8 ++++----
 plugins/FeedsFeedNodeProcessor.inc |  4 ++--
 plugins/FeedsNodeProcessor.inc     |  4 ++--
 plugins/FeedsTermProcessor.inc     | 12 ++++++------
 plugins/FeedsUserProcessor.inc     | 10 +++++-----
 5 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/plugins/FeedsDataProcessor.inc b/plugins/FeedsDataProcessor.inc
index 2f1afcd4..d49355b9 100644
--- a/plugins/FeedsDataProcessor.inc
+++ b/plugins/FeedsDataProcessor.inc
@@ -42,10 +42,10 @@ class FeedsDataProcessor extends FeedsProcessor {
 
     // Set messages.
     if ($inserted) {
-      drupal_set_message(format_plural($inserted, 'Created !number item.', 'Created !number items.', array('!number' => $inserted)));
+      drupal_set_message(format_plural($inserted, 'Created @number item.', 'Created @number items.', array('@number' => $inserted)));
     }
     elseif ($updated) {
-      drupal_set_message(format_plural($updated, 'Updated !number item.', 'Updated !number items.', array('!number' => $updated)));
+      drupal_set_message(format_plural($updated, 'Updated @number item.', 'Updated @number items.', array('@number' => $updated)));
     }
     else {
       drupal_set_message(t('There are no new items.'));
@@ -64,7 +64,7 @@ class FeedsDataProcessor extends FeedsProcessor {
       'feed_nid' => $source->feed_nid,
     );
     $num = $this->handler()->delete($clause);
-    drupal_set_message(format_plural($num, 'Deleted !number item.', 'Deleted !number items.', array('!number' => $num)));
+    drupal_set_message(format_plural($num, 'Deleted @number item.', 'Deleted @number items.', array('@number' => $num)));
     return FEEDS_BATCH_COMPLETE;
   }
 
@@ -85,7 +85,7 @@ class FeedsDataProcessor extends FeedsProcessor {
       ),
     );
     $num = $this->handler()->delete($clause);
-    drupal_set_message(format_plural($num, 'Expired !number record from !table.', 'Expired !number records from !table.', array('!number' => $num, '!table' => $this->tableName())));
+    drupal_set_message(format_plural($num, 'Expired @number record from @table.', 'Expired @number records from @table.', array('@number' => $num, '@table' => $this->tableName())));
     return FEEDS_BATCH_COMPLETE;
   }
 
diff --git a/plugins/FeedsFeedNodeProcessor.inc b/plugins/FeedsFeedNodeProcessor.inc
index 120bcba2..84fe4943 100644
--- a/plugins/FeedsFeedNodeProcessor.inc
+++ b/plugins/FeedsFeedNodeProcessor.inc
@@ -45,10 +45,10 @@ class FeedsFeedNodeProcessor extends FeedsProcessor {
 
     // Set messages.
     if ($batch->created) {
-      drupal_set_message(format_plural($batch->created, 'Created !number !type node.', 'Created !number !type nodes.', array('!number' => $batch->created, '!type' => $this->config['content_type'])));
+      drupal_set_message(format_plural($batch->created, 'Created @number @type node.', 'Created @number @type nodes.', array('@number' => $batch->created, '@type' => $this->config['content_type'])));
     }
     elseif ($batch->updated) {
-      drupal_set_message(format_plural($batch->updated, 'Updated !number !type node.', 'Updated !number !type nodes.', array('!number' => $batch->updated, '!type' => $this->config['content_type'])));
+      drupal_set_message(format_plural($batch->updated, 'Updated @number @type node.', 'Updated @number @type nodes.', array('@number' => $batch->updated, '@type' => $this->config['content_type'])));
     }
     else {
       drupal_set_message(t('There is no new content.'));
diff --git a/plugins/FeedsNodeProcessor.inc b/plugins/FeedsNodeProcessor.inc
index 62f56ad7..0ef4778b 100644
--- a/plugins/FeedsNodeProcessor.inc
+++ b/plugins/FeedsNodeProcessor.inc
@@ -81,7 +81,7 @@ class FeedsNodeProcessor extends FeedsProcessor {
 
     // Set messages.
     if ($batch->created) {
-      drupal_set_message(format_plural($batch->created, 'Created @number @type node.', 'Created !number @type nodes.', array('@number' => $batch->created, '@type' => node_get_types('name', $this->config['content_type']))));
+      drupal_set_message(format_plural($batch->created, 'Created @number @type node.', 'Created @number @type nodes.', array('@number' => $batch->created, '@type' => node_get_types('name', $this->config['content_type']))));
     }
     elseif ($batch->updated) {
       drupal_set_message(format_plural($batch->updated, 'Updated @number @type node.', 'Updated @number @type nodes.', array('@number' => $batch->updated, '@type' => node_get_types('name', $this->config['content_type']))));
@@ -112,7 +112,7 @@ class FeedsNodeProcessor extends FeedsProcessor {
     // Set message.
     drupal_get_messages('status');
     if ($batch->deleted) {
-      drupal_set_message(format_plural($batch->deleted, 'Deleted !number node.', 'Deleted !number nodes.', array('!number' => $batch->deleted)));
+      drupal_set_message(format_plural($batch->deleted, 'Deleted @number node.', 'Deleted @number nodes.', array('@number' => $batch->deleted)));
     }
     else {
       drupal_set_message(t('There is no content to be deleted.'));
diff --git a/plugins/FeedsTermProcessor.inc b/plugins/FeedsTermProcessor.inc
index 31ef7ee5..1abd6212 100644
--- a/plugins/FeedsTermProcessor.inc
+++ b/plugins/FeedsTermProcessor.inc
@@ -61,18 +61,18 @@ class FeedsTermProcessor extends FeedsProcessor {
       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)
+          '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)));
+      drupal_set_message(format_plural($created, 'Created @number term in !vocabulary.', 'Created @number terms in !vocabulary.', array('@number' => $created, '!vocabulary' => $vocabulary->name)));
     }
     elseif ($updated) {
-      drupal_set_message(format_plural($updated, 'Updated !number term in !vocabulary.', 'Updated !number terms in !vocabulary.', array('!number' => $updated, '!vocabulary' => $vocabulary->name)));
+      drupal_set_message(format_plural($updated, 'Updated @number term in !vocabulary.', 'Updated @number terms in !vocabulary.', array('@number' => $updated, '!vocabulary' => $vocabulary->name)));
     }
     else {
       drupal_set_message(t('There are no new terms.'));
@@ -98,7 +98,7 @@ class FeedsTermProcessor extends FeedsProcessor {
     $vocabularies = taxonomy_get_vocabularies();
     $vocabulary = $vocabularies[$this->config['vocabulary']];
     if ($deleted) {
-      drupal_set_message(format_plural($deleted, 'Deleted !number term from !vocabulary.', 'Deleted !number terms from !vocabulary.', array('!number' => $deleted, '!vocabulary' => $vocabulary->name)));
+      drupal_set_message(format_plural($deleted, 'Deleted @number term from !vocabulary.', 'Deleted @number terms from !vocabulary.', array('@number' => $deleted, '!vocabulary' => $vocabulary->name)));
     }
     else {
       drupal_set_message(t('No terms to be deleted.'));
diff --git a/plugins/FeedsUserProcessor.inc b/plugins/FeedsUserProcessor.inc
index 04afee0a..f3f66238 100644
--- a/plugins/FeedsUserProcessor.inc
+++ b/plugins/FeedsUserProcessor.inc
@@ -64,18 +64,18 @@ class FeedsUserProcessor extends FeedsProcessor {
       drupal_set_message(
         format_plural(
           $failed,
-          'There was !number user that could not be imported because either their name or their email was empty or not valid. Check import data and mapping settings on User processor.',
-          'There were !number users that could not be imported because either their name or their email was empty or not valid. Check import data and mapping settings on User processor.',
-          array('!number' => $failed)
+          'There was @number user that could not be imported because either their name or their email was empty or not valid. Check import data and mapping settings on User processor.',
+          'There were @number users that could not be imported because either their name or their email was empty or not valid. Check import data and mapping settings on User processor.',
+          array('@number' => $failed)
         ),
         'error'
       );
     }
     if ($created) {
-      drupal_set_message(format_plural($created, 'Created !number user.', 'Created !number users.', array('!number' => $created)));
+      drupal_set_message(format_plural($created, 'Created @number user.', 'Created @number users.', array('@number' => $created)));
     }
     elseif ($updated) {
-      drupal_set_message(format_plural($updated, 'Updated !number user.', 'Updated !number users.', array('!number' => $updated)));
+      drupal_set_message(format_plural($updated, 'Updated @number user.', 'Updated @number users.', array('@number' => $updated)));
     }
     else {
       drupal_set_message(t('There are no new users.'));
-- 
GitLab