Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
634893f2
Commit
634893f2
authored
Feb 16, 2004
by
Dries
Browse files
- Patch 5683 by JonBob: changes the multiple type delimiter from / to -.
parent
b4f628c1
Changes
2
Hide whitespace changes
Inline
Side-by-side
modules/node.module
View file @
634893f2
...
...
@@ -227,7 +227,7 @@ function node_teaser($body) {
*/
function
node_get_module_name
(
$node
)
{
if
(
is_array
(
$node
))
{
if
(
$pos
=
strpos
(
$node
[
'type'
],
'
/
'
))
{
if
(
$pos
=
strpos
(
$node
[
'type'
],
'
-
'
))
{
return
substr
(
$node
[
'type'
],
0
,
$pos
);
}
else
{
...
...
@@ -235,7 +235,7 @@ function node_get_module_name($node) {
}
}
else
if
(
is_object
(
$node
))
{
if
(
$pos
=
strpos
(
$node
->
type
,
'
/
'
))
{
if
(
$pos
=
strpos
(
$node
->
type
,
'
-
'
))
{
return
substr
(
$node
->
type
,
0
,
$pos
);
}
else
{
...
...
@@ -243,7 +243,7 @@ function node_get_module_name($node) {
}
}
else
if
(
is_string
(
$node
))
{
if
(
$pos
=
strpos
(
$node
,
'
/
'
))
{
if
(
$pos
=
strpos
(
$node
,
'
-
'
))
{
return
substr
(
$node
,
0
,
$pos
);
}
else
{
...
...
@@ -1521,8 +1521,7 @@ function node_page() {
node_feed
();
return
;
case
'add'
:
// 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
)));
print
theme
(
'page'
,
node_add
(
arg
(
2
)));
break
;
case
'edit'
:
print
theme
(
'page'
,
node_edit
(
arg
(
2
)));
...
...
modules/node/node.module
View file @
634893f2
...
...
@@ -227,7 +227,7 @@ function node_teaser($body) {
*/
function
node_get_module_name
(
$node
)
{
if
(
is_array
(
$node
))
{
if
(
$pos
=
strpos
(
$node
[
'type'
],
'
/
'
))
{
if
(
$pos
=
strpos
(
$node
[
'type'
],
'
-
'
))
{
return
substr
(
$node
[
'type'
],
0
,
$pos
);
}
else
{
...
...
@@ -235,7 +235,7 @@ function node_get_module_name($node) {
}
}
else
if
(
is_object
(
$node
))
{
if
(
$pos
=
strpos
(
$node
->
type
,
'
/
'
))
{
if
(
$pos
=
strpos
(
$node
->
type
,
'
-
'
))
{
return
substr
(
$node
->
type
,
0
,
$pos
);
}
else
{
...
...
@@ -243,7 +243,7 @@ function node_get_module_name($node) {
}
}
else
if
(
is_string
(
$node
))
{
if
(
$pos
=
strpos
(
$node
,
'
/
'
))
{
if
(
$pos
=
strpos
(
$node
,
'
-
'
))
{
return
substr
(
$node
,
0
,
$pos
);
}
else
{
...
...
@@ -1521,8 +1521,7 @@ function node_page() {
node_feed
();
return
;
case
'add'
:
// 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
)));
print
theme
(
'page'
,
node_add
(
arg
(
2
)));
break
;
case
'edit'
:
print
theme
(
'page'
,
node_edit
(
arg
(
2
)));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment