#206670 by keith.smith and myself: node type names have their underscores converted to hyphens in node/add links
parent
444c5e16be
commit
19619d9354
|
@ -675,7 +675,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/$type/$variables[tid]");
|
||||
$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]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ function translation_node_overview($node) {
|
|||
// No such translation in the set yet: help user to create it.
|
||||
$title = t('n/a');
|
||||
if (node_access('create', $node)) {
|
||||
$options[] = l(t('add translation'), 'node/add/'. $node->type, array('query' => "translation=$node->nid&language=$language->language"));
|
||||
$options[] = l(t('add translation'), 'node/add/'. str_replace('_', '-', $node->type), array('query' => "translation=$node->nid&language=$language->language"));
|
||||
}
|
||||
$status = t('Not translated');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue