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

Convert node_get_types().

parent 27b17eb1
No related branches found
No related tags found
No related merge requests found
......@@ -617,7 +617,7 @@ function feeds_cache_clear($rebuild_menu = TRUE) {
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();
}
......
......@@ -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_get_types('name', $importer->config['content_type']);
$title = node_types_get('name', $importer->config['content_type']);
}
$rows[] = array(
l($title, $link),
......
......@@ -69,10 +69,10 @@ function feeds_ui_overview_form(&$form_status) {
}
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']);
}
}
......@@ -320,7 +320,7 @@ function feeds_ui_edit_page($importer, $active = 'help', $plugin_key = '') {
// 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');
}
......
......@@ -116,7 +116,7 @@ class FeedsFeedNodeProcessor extends FeedsProcessor {
$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)) {
......
......@@ -70,10 +70,10 @@ class FeedsNodeProcessor extends FeedsProcessor {
// 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.'));
......
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