Skip to content
Snippets Groups Projects
Commit 11d6882c authored by Alex Barth's avatar Alex Barth
Browse files

More filtering of innocent output.

parent 6745790b
No related branches found
No related tags found
No related merge requests found
...@@ -42,10 +42,10 @@ class FeedsDataProcessor extends FeedsProcessor { ...@@ -42,10 +42,10 @@ class FeedsDataProcessor extends FeedsProcessor {
// Set messages. // Set messages.
if ($inserted) { 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) { 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 { else {
drupal_set_message(t('There are no new items.')); drupal_set_message(t('There are no new items.'));
...@@ -64,7 +64,7 @@ class FeedsDataProcessor extends FeedsProcessor { ...@@ -64,7 +64,7 @@ class FeedsDataProcessor extends FeedsProcessor {
'feed_nid' => $source->feed_nid, 'feed_nid' => $source->feed_nid,
); );
$num = $this->handler()->delete($clause); $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; return FEEDS_BATCH_COMPLETE;
} }
...@@ -85,7 +85,7 @@ class FeedsDataProcessor extends FeedsProcessor { ...@@ -85,7 +85,7 @@ class FeedsDataProcessor extends FeedsProcessor {
), ),
); );
$num = $this->handler()->delete($clause); $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; return FEEDS_BATCH_COMPLETE;
} }
......
...@@ -45,10 +45,10 @@ class FeedsFeedNodeProcessor extends FeedsProcessor { ...@@ -45,10 +45,10 @@ class FeedsFeedNodeProcessor extends FeedsProcessor {
// Set messages. // Set messages.
if ($batch->created) { 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) { 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 { else {
drupal_set_message(t('There is no new content.')); drupal_set_message(t('There is no new content.'));
......
...@@ -81,7 +81,7 @@ class FeedsNodeProcessor extends FeedsProcessor { ...@@ -81,7 +81,7 @@ class FeedsNodeProcessor extends FeedsProcessor {
// Set messages. // Set messages.
if ($batch->created) { 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) { 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'])))); 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 { ...@@ -112,7 +112,7 @@ class FeedsNodeProcessor extends FeedsProcessor {
// Set message. // Set message.
drupal_get_messages('status'); drupal_get_messages('status');
if ($batch->deleted) { 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 { else {
drupal_set_message(t('There is no content to be deleted.')); drupal_set_message(t('There is no content to be deleted.'));
......
...@@ -61,18 +61,18 @@ class FeedsTermProcessor extends FeedsProcessor { ...@@ -61,18 +61,18 @@ class FeedsTermProcessor extends FeedsProcessor {
drupal_set_message( drupal_set_message(
format_plural( format_plural(
$no_name, $no_name,
'There was !number term that could not be imported because their name was empty. Check mapping settings on Taxomy term processor.', '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.', '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) array('@number' => $no_name)
), ),
'error' 'error'
); );
} }
if ($created) { 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) { 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 { else {
drupal_set_message(t('There are no new terms.')); drupal_set_message(t('There are no new terms.'));
...@@ -98,7 +98,7 @@ class FeedsTermProcessor extends FeedsProcessor { ...@@ -98,7 +98,7 @@ class FeedsTermProcessor extends FeedsProcessor {
$vocabularies = taxonomy_get_vocabularies(); $vocabularies = taxonomy_get_vocabularies();
$vocabulary = $vocabularies[$this->config['vocabulary']]; $vocabulary = $vocabularies[$this->config['vocabulary']];
if ($deleted) { 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 { else {
drupal_set_message(t('No terms to be deleted.')); drupal_set_message(t('No terms to be deleted.'));
......
...@@ -64,18 +64,18 @@ class FeedsUserProcessor extends FeedsProcessor { ...@@ -64,18 +64,18 @@ class FeedsUserProcessor extends FeedsProcessor {
drupal_set_message( drupal_set_message(
format_plural( format_plural(
$failed, $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 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.', '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) array('@number' => $failed)
), ),
'error' 'error'
); );
} }
if ($created) { 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) { 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 { else {
drupal_set_message(t('There are no new users.')); drupal_set_message(t('There are no new users.'));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment