diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-06-04 03:33:29 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-06-04 03:33:29 +0000 |
commit | cab88a70149d7a1302d1e1e930fc19f909086a25 (patch) | |
tree | ae64e7c211fc6150dfac0a1fdb456ba893c02aca /modules/forum | |
parent | 6fc4eb9f945ecd7c2bea4742e3febe4632c88e99 (diff) | |
download | brdo-cab88a70149d7a1302d1e1e930fc19f909086a25.tar.gz brdo-cab88a70149d7a1302d1e1e930fc19f909086a25.tar.bz2 |
#220233 by Berdir, marcingy, et al: Add useful API functions for extracting node type data.
Diffstat (limited to 'modules/forum')
-rw-r--r-- | modules/forum/forum.module | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/forum/forum.module b/modules/forum/forum.module index c34f666bf..17f70059a 100644 --- a/modules/forum/forum.module +++ b/modules/forum/forum.module @@ -538,7 +538,7 @@ function forum_block_view($delta = '') { * Implement hook_form(). */ function forum_form($node, $form_state) { - $type = node_get_types('type', $node); + $type = node_type_get_type($node); $form['title'] = array('#type' => 'textfield', '#title' => check_plain($type->title_label), '#default_value' => !empty($node->title) ? $node->title : '', '#required' => TRUE, '#weight' => -5); if (!empty($node->nid)) { @@ -746,7 +746,7 @@ function template_preprocess_forums(&$variables) { if (node_access('create', $type)) { // Fetch the "General" name of the content type; // Push the link with title and url to the array. - $forum_types[$type] = array('title' => t('Post new @node_type', array('@node_type' => node_get_types('name', $type))), 'href' => 'node/add/' . str_replace('_', '-', $type) . '/' . $variables['tid']); + $forum_types[$type] = array('title' => t('Post new @node_type', array('@node_type' => node_type_get_name($type))), 'href' => 'node/add/' . str_replace('_', '-', $type) . '/' . $variables['tid']); } } |