diff --git a/feeds_ui/feeds_ui.admin.inc b/feeds_ui/feeds_ui.admin.inc index 52afd1858a54ab6cd7fc6a2905b85769373c717a..ce8f1ed743b9de3b464c11bb1efa25f1465a72f1 100644 --- a/feeds_ui/feeds_ui.admin.inc +++ b/feeds_ui/feeds_ui.admin.inc @@ -348,7 +348,7 @@ function feeds_ui_edit_page($importer, $active = 'help', $plugin_key = '') { // Fetcher. $fetcher = $plugins[$config['fetcher']['plugin_key']]; $actions = array(); - if (feeds_get_form($importer->fetcher, 'configForm')) { + if ($importer->fetcher->hasConfigForm()) { $actions = array(l(t('Settings'), $path . '/settings/' . $config['fetcher']['plugin_key'])); } $info['title'] = t('Fetcher'); @@ -365,7 +365,7 @@ function feeds_ui_edit_page($importer, $active = 'help', $plugin_key = '') { // Parser. $parser = $plugins[$config['parser']['plugin_key']]; $actions = array(); - if (feeds_get_form($importer->parser, 'configForm')) { + if ($importer->parser->hasConfigForm()) { $actions = array(l(t('Settings'), $path . '/settings/' . $config['parser']['plugin_key'])); } $info['title'] = t('Parser'); @@ -382,7 +382,7 @@ function feeds_ui_edit_page($importer, $active = 'help', $plugin_key = '') { // Processor. $processor = $plugins[$config['processor']['plugin_key']]; $actions = array(); - if (feeds_get_form($importer->processor, 'configForm')) { + if ($importer->processor->hasConfigForm()) { $actions[] = l(t('Settings'), $path . '/settings/' . $config['processor']['plugin_key']); } $actions[] = l(t('Mapping'), $path . '/mapping'); diff --git a/includes/FeedsConfigurable.inc b/includes/FeedsConfigurable.inc index 053001359e03966f7b3e76ce45ba7baf66e6a1fd..2370cc41d798e2447344fd0e58b0c010982ddbd9 100644 --- a/includes/FeedsConfigurable.inc +++ b/includes/FeedsConfigurable.inc @@ -169,6 +169,17 @@ abstract class FeedsConfigurable { return array(); } + /** + * Returns whether or not the configurable has a config form. + * + * @return bool + * True if the configurable has a config form, and false if not. + */ + public function hasConfigForm() { + $form_state = array(); + return (bool) $this->configForm($form_state); + } + /** * Return configuration form for this object. The keys of the configuration * form must match the keys of the array returned by configDefaults().