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

Only return enabled importers on feeds_import_by_content_type().

parent 49d6dd84
No related branches found
No related tags found
No related merge requests found
...@@ -495,7 +495,7 @@ function feeds_importer_enabled($id) { ...@@ -495,7 +495,7 @@ function feeds_importer_enabled($id) {
} }
/** /**
* Get a feed configuration by content type. * Get a an enabled importer configuration by content type.
* *
* @todo: speed this up by DB caching the result. * @todo: speed this up by DB caching the result.
* *
...@@ -511,7 +511,7 @@ function feeds_importer_by_content_type($content_type) { ...@@ -511,7 +511,7 @@ function feeds_importer_by_content_type($content_type) {
if (!isset($feeds[$content_type])) { if (!isset($feeds[$content_type])) {
$feeds[$content_type] = FALSE; $feeds[$content_type] = FALSE;
foreach (feeds_importer_load_all() as $importer) { foreach (feeds_importer_load_all() as $importer) {
if ($importer->config['content_type'] == $content_type) { if ((!$importer->disabled) && $importer->config['content_type'] == $content_type) {
$feeds[$content_type] = $importer; $feeds[$content_type] = $importer;
break; break;
} }
......
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