Commit 5fcec47b authored by jcnventura's avatar jcnventura

Issue #684178: support node/add/{nodetype} and similar paths.

parent c6ae424e
......@@ -82,7 +82,7 @@ function print_controller($path, $format, $cid = NULL, $teaser = FALSE) {
$path = $alias;
}
$parts = explode('/', $path);
if (($parts[0] == 'node') && (count($parts) > 1)) {
if (($parts[0] == 'node') && (count($parts) > 1) && ctype_digit($parts[1])) {
array_shift($parts);
$path = implode('/', $parts);
}
......
......@@ -540,7 +540,7 @@ function print_ui_insert_link($link, $path = NULL, $node = NULL) {
}
else {
if ($path === NULL) {
$nid = preg_replace('!^node/!', '', $_GET['q']);
$nid = preg_replace('!^node/([\d]+)!', '$1', $_GET['q']);
$path = $_GET['q'];
}
else {
......
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