diff --git a/feeds.module b/feeds.module index 25c4a72..4a338da 100644 --- a/feeds.module +++ b/feeds.module @@ -866,26 +866,31 @@ function feeds_importer_load_all($load_disabled = FALSE) { if (function_exists('ctools_include')) { ctools_include('export'); $configs = ctools_export_load_object('feeds_importer', 'all'); - uasort($configs, 'feeds_importer_load_all_name_sort'); foreach ($configs as $config) { if (!empty($config->id) && ($load_disabled || empty($config->disabled))) { $feeds[$config->id] = feeds_importer($config->id); } } + uasort($feeds, 'feeds_importer_name_sort'); } return $feeds; } /** - * Sort Function For Feeds Importer Load All By Config Name + * Sorts importers by name. * - * @param $config_x - * @param $config_y + * Callback for uasort(). * - * @return integer + * @param FeedsImporter $a + * The first FeedsImporter for comparison. + * @param FeedsImporter $b + * The second FeedsImporter for comparison. + * + * @return int + * The comparison result for uasort(). */ -function feeds_importer_load_all_name_sort($config_x, $config_y) { - return strcasecmp($config_x->config["name"], $config_y->config["name"]); +function feeds_importer_name_sort(FeedsImporter $a, FeedsImporter $b) { + return strcasecmp($a->config['name'], $b->config['name']); } /**