Commit 19619d93 authored by Gábor Hojtsy's avatar Gábor Hojtsy

#206670 by keith.smith and myself: node type names have their underscores...

#206670 by keith.smith and myself: node type names have their underscores converted to hyphens in node/add links
parent 444c5e16
......@@ -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');
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment