ctools_static_reset('_feeds_importer_digest');
ctools_include('export');
ctools_export_load_object_reset('feeds_importer');
- node_get_types('types', NULL, TRUE);
+ drupal_static_reset('_node_types_build');
if ($rebuild_menu) {
menu_rebuild();
}
}
elseif (user_access('create '. $importer->config['content_type'] .' content')) {
$link = 'node/add/'. str_replace('_', '-', $importer->config['content_type']);
- $title = node_get_types('name', $importer->config['content_type']);
+ $title = node_types_get('name', $importer->config['content_type']);
}
$rows[] = array(
l($title, $link),
}
else {
if (!$importer->disabled) {
- $importer_form['attached']['#value'] = l(node_get_types('name', $importer->config['content_type']), 'node/add/'. str_replace('_', '-', $importer->config['content_type']));
+ $importer_form['attached']['#value'] = l(node_type_get_name($importer->config['content_type']), 'node/add/'. str_replace('_', '-', $importer->config['content_type']));
}
else {
- $importer_form['attached']['#value'] = node_get_types('name', $importer->config['content_type']);
+ $importer_form['attached']['#value'] = node_type_get_name($importer->config['content_type']);
}
}
// Basic information.
$items = array();
- $items[] = t('Attached to: !type', array('!type' => $importer->config['content_type'] ? node_get_types('name', $importer->config['content_type']) : t('[none]')));
+ $items[] = t('Attached to: @type', array('@type' => $importer->config['content_type'] ? node_type_get_name($importer->config['content_type']) : t('[none]')));
if ($importer->config['import_period'] == FEEDS_SCHEDULE_NEVER) {
$import_period = t('never');
}
$types = array();
foreach ($feeds as $feed) {
if ($feed->id != $this->id && !empty($feed->config['content_type'])) {
- $types[$feed->config['content_type']] = node_get_types('name', $feed->config['content_type']);
+ $types[$feed->config['content_type']] = check_plain(node_type_get_name($feed->config['content_type']));
}
}
if (empty($types)) {
// Set messages.
if ($batch->created) {
- drupal_set_message(format_plural($batch->created, 'Created @number @type node.', 'Created @number @type nodes.', array('@number' => $batch->created, '@type' => node_get_types('name', $this->config['content_type']))));
+ drupal_set_message(format_plural($batch->created, 'Created @number @type node.', 'Created @number @type nodes.', array('@number' => $batch->created, '@type' => node_type_get_name($this->config['content_type']))));
}
elseif ($batch->updated) {
- drupal_set_message(format_plural($batch->updated, 'Updated @number @type node.', 'Updated @number @type nodes.', array('@number' => $batch->updated, '@type' => node_get_types('name', $this->config['content_type']))));
+ drupal_set_message(format_plural($batch->updated, 'Updated @number @type node.', 'Updated @number @type nodes.', array('@number' => $batch->updated, '@type' => node_type_get_name($this->config['content_type']))));
}
else {
drupal_set_message(t('There is no new content.'));