diff --git a/feeds.pages.inc b/feeds.pages.inc index a0ed26942741a10dee2fda0f9aed88a43a8e24a9..db0b7c5abc74de4475351b623721b72b90b7794e 100644 --- a/feeds.pages.inc +++ b/feeds.pages.inc @@ -25,7 +25,7 @@ function feeds_page() { } elseif (user_access('create '. $importer->config['content_type'] .' content')) { $link = 'node/add/'. str_replace('_', '-', $importer->config['content_type']); - $title = node_types_get('name', $importer->config['content_type']); + $title = node_type_get_name($importer->config['content_type']); } $rows[] = array( l($title, $link), diff --git a/includes/FeedsImporter.inc b/includes/FeedsImporter.inc index 70885762dd0f509c5ee5783ef976b2c2a546c542..c02257fd493cee34cf2e09e39d37cf8d4342b947 100644 --- a/includes/FeedsImporter.inc +++ b/includes/FeedsImporter.inc @@ -236,11 +236,13 @@ class FeedsImporter extends FeedsConfigurable { '#description' => t('A description of this configuration.'), '#default_value' => $this->config['description'], ); + $node_types = node_type_get_names(); + array_walk($node_types, 'check_plain'); $form['content_type'] = array( '#type' => 'select', '#title' => t('Attach to content type'), '#description' => t('If an importer is attached to a content type, content is imported by creating a node. If the standalone form is selected, content is imported by using the standalone form under http://example.com/import.'), - '#options' => array('' => t('Use standalone form')) + node_get_types('names'), + '#options' => array('' => t('Use standalone form')) + $node_types, '#default_value' => $this->config['content_type'], ); $period = drupal_map_assoc(array(0, 900, 1800, 3600, 10800, 21600, 43200, 86400, 259200, 604800, 2419200), 'format_interval'); diff --git a/plugins/FeedsNodeProcessor.inc b/plugins/FeedsNodeProcessor.inc index 52c5f24d3e304b55dff48dcabbb8491a0f220589..9d47cc3e65d084b68fad20f8cb56acf4290a6a27 100644 --- a/plugins/FeedsNodeProcessor.inc +++ b/plugins/FeedsNodeProcessor.inc @@ -141,7 +141,7 @@ class FeedsNodeProcessor extends FeedsProcessor { * Override parent::configDefaults(). */ public function configDefaults() { - $types = node_get_types('names'); + $types = node_type_get_names(); $type = isset($types['story']) ? 'story' : key($types); return array( 'content_type' => $type, @@ -157,7 +157,8 @@ class FeedsNodeProcessor extends FeedsProcessor { * Override parent::configForm(). */ public function configForm(&$form_state) { - $types = node_get_types('names'); + $types = node_type_get_names(); + array_walk($types, 'check_plain'); $form = array(); $form['content_type'] = array( '#type' => 'select', @@ -257,7 +258,7 @@ class FeedsNodeProcessor extends FeedsProcessor { ), ); // Include body field only if available. - $type = node_get_types('type', $this->config['content_type']); + $type = node_type_get_type($this->config['content_type']); if ($type->has_body) { // Using 'teaser' instead of 'body' forces entire content above the break. $targets['body'] = array(