You are here

function feed_import_process_feed in Feed Import 7.3

Same name and namespace in other branches
  1. 7 feed_import.module \feed_import_process_feed()
  2. 7.2 feed_import.module \feed_import_process_feed()

Process a feed

1 string reference to 'feed_import_process_feed'
feed_import_menu in ./feed_import.module
Implements hook_menu().

File

./feed_import.module, line 2455
User interface, cron functions for feed_import module

Code

function feed_import_process_feed($feed) {
  $status = _feed_import_base_process_feed($feed, TRUE);
  switch ($status) {
    case FeedImport::FEED_OK:
      drupal_set_message(t('Feed @name processed!', array(
        '@name' => $feed->name,
      )));
      break;
    case FeedImport::FEED_OVERLAP_ERR:
      drupal_set_message(t('Cannot process feed because another one is running!'), 'error');
      break;
    case FeedImport::FEED_CONFIG_ERR:
      drupal_set_message(t('Cannot process feed because source is misconfigured!'), 'error');
      break;
    case FeedImport::FEED_SOURCE_ERR:
      drupal_set_message(t('Cannot process feed because there is a source error!'), 'error');
      drupal_set_message(t('All items were rescheduled due to delete protection!'), 'warning');
      break;
    case FeedImport::FEED_ITEMS_ERR:
      drupal_set_message(t('Feed @name processed!', array(
        '@name' => $feed->name,
      )));
      drupal_set_message(t('All items were rescheduled due to delete protection!'), 'warning');
      break;
  }
  drupal_goto(FEED_IMPORT_PATH);
}