Skip to content
Snippets Groups Projects
Commit ae9544a1 authored by tmsimont's avatar tmsimont Committed by Chris Leppanen
Browse files

Issue #777888 by WorldFallz, liquidcms, firfin, tmsimont | timwood: Followup...

Issue #777888 by WorldFallz, liquidcms, firfin, tmsimont | timwood: Followup to importing importers.
parent b83352ff
No related branches found
No related tags found
No related merge requests found
......@@ -1175,12 +1175,14 @@ function feeds_ui_importer_import_validate($form, &$form_state) {
*/
function feeds_ui_importer_import_submit($form, &$form_state) {
$importer = $form_state['importer'];
$importer = feeds_importer($importer->id);
$importer->setConfig($importer->config);
// Create a copy of the importer to preserve config.
$save = feeds_importer($importer->id);
$save->setConfig($importer->config);
foreach (array('fetcher', 'parser', 'processor') as $type) {
$importer->$type->setConfig($importer->config[$type]['config']);
$save->$type->setConfig($importer->config[$type]['config']);
}
$importer->save();
$save->save();
drupal_set_message(t('Successfully imported the %id feeds importer.', array('%id' => $importer->id)));
$form_state['redirect'] = 'admin/structure/feeds';
......
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