function feed_import_process_feed in Feed Import 7.2
Same name and namespace in other branches
- 7.3 feed_import.module \feed_import_process_feed()
- 7 feed_import.module \feed_import_process_feed()
Processes a feed
Parameters
int $id: Feed id to process
1 string reference to 'feed_import_process_feed'
- feed_import_menu in ./
feed_import.module - Implements hook_menu().
File
- ./
feed_import.module, line 696 - User interface, cron functions for feed_import module
Code
function feed_import_process_feed($id = 0) {
$err = FALSE;
if ($id) {
$feed = FeedImport::loadFeeds(FALSE, $id);
if (!empty($feed)) {
feed_import_import_items($feed);
drupal_set_message(t('Feed @name processed!', array(
'@name' => $feed['name'],
)));
}
else {
$err = TRUE;
}
}
else {
$err = TRUE;
}
if ($err) {
drupal_set_message(t('Feed cannot be processed!'), 'error');
}
drupal_goto(FEED_IMPORT_PATH);
}