function feedapi_import_feeds_form_submit in FeedAPI 5
Handle the submission of the OPML import form
File
- ./
feedapi.module, line 310 - Handle the submodules (for feed and item processing) Provide a basic management of feeds
Code
function feedapi_import_feeds_form_submit($form_id, $form_values) {
$file = file_check_upload('opml');
if ($file = file($file->filepath)) {
$file = implode('', $file);
if ($count = _feedapi_import_opml_process($file, $form_values)) {
drupal_set_message(t('Successfuly imported %count feeds from OPML', array(
'%count' => $count,
)));
}
else {
drupal_set_message(t('Feed list could not be imported. Please check that this is a valid OPML file.'), 'error');
}
}
else {
drupal_set_message(t('Data could not be retrieved, invalid or empty file.'), 'error');
}
return 'admin/content/feed';
}