summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2004-02-06 19:11:59 +0000
committerDries Buytaert <dries@buytaert.net>2004-02-06 19:11:59 +0000
commit3e5d74983816af3385a2ac980fcd7fc9b037722d (patch)
tree3487d18cf810e78ae222a01e3c73ba64f7d96594
parentbfba335376c8a15c74ec0e8ec71541193b458073 (diff)
downloadbrdo-3e5d74983816af3385a2ac980fcd7fc9b037722d.tar.gz
brdo-3e5d74983816af3385a2ac980fcd7fc9b037722d.tar.bz2
- Fixed problem with multiple node types. Patch by JonBob.
-rw-r--r--modules/node.module3
-rw-r--r--modules/node/node.module3
2 files changed, 4 insertions, 2 deletions
diff --git a/modules/node.module b/modules/node.module
index 3f072bb07..80847713e 100644
--- a/modules/node.module
+++ b/modules/node.module
@@ -1498,7 +1498,8 @@ function node_page() {
node_feed();
return;
case 'add':
- print theme('page', node_add(arg(2)));
+ // When a module defines multiple node types, the URL is of the form 'foo/bar':
+ print theme('page', node_add(arg(3) ? arg(2) ."/". arg(3) : arg(2)));
break;
case 'edit':
print theme('page', node_edit(arg(2)));
diff --git a/modules/node/node.module b/modules/node/node.module
index 3f072bb07..80847713e 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -1498,7 +1498,8 @@ function node_page() {
node_feed();
return;
case 'add':
- print theme('page', node_add(arg(2)));
+ // When a module defines multiple node types, the URL is of the form 'foo/bar':
+ print theme('page', node_add(arg(3) ? arg(2) ."/". arg(3) : arg(2)));
break;
case 'edit':
print theme('page', node_edit(arg(2)));