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

Per default, only load enabled.

There is a caching problem where caches cleared reflect the second last configuration.
parent 7b72687f
No related branches found
No related tags found
No related merge requests found
......@@ -446,10 +446,12 @@ function feeds_scheduler_work($feed_info) {
/**
* Load all importers.
*
* @
*
* @return
* An array of all feed configurations available.
*/
function feeds_importer_load_all() {
function feeds_importer_load_all($load_disabled = FALSE) {
$feeds = array();
// This function can get called very early in install process through
// menu_router_rebuild(). Do not try to include CTools if not available.
......@@ -457,7 +459,7 @@ function feeds_importer_load_all() {
ctools_include('export');
$configs = ctools_export_load_object('feeds_importer', 'all');
foreach ($configs as $config) {
if ($config->id) {
if (!empty($config->id) && ($load_disabled || !$config->disabled)) {
$feeds[$config->id] = feeds_importer($config->id);
}
}
......
......@@ -61,7 +61,7 @@ function feeds_ui_overview_form(&$form_status) {
t('Operations'),
t('Enabled'),
);
foreach (feeds_importer_load_all() as $importer) {
foreach (feeds_importer_load_all(TRUE) as $importer) {
$importer_form = array();
$importer_form['name']['#value'] = $importer->config['name'];
$importer_form['description']['#value'] = $importer->config['description'];
......@@ -135,7 +135,7 @@ function feeds_ui_overview_form(&$form_status) {
function feeds_ui_overview_form_submit($form, &$form_state) {
$disabled = array();
foreach (feeds_importer_load_all() as $importer) {
foreach (feeds_importer_load_all(TRUE) as $importer) {
$disabled[$importer->id] = !$form_state['values'][$importer->id];
}
variable_set('default_feeds_importer', $disabled);
......
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