Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Commits
634893f2
Commit
634893f2
authored
Feb 16, 2004
by
Dries Buytaert
Browse files
Options
Downloads
Patches
Plain Diff
- Patch 5683 by JonBob: changes the multiple type delimiter from / to -.
parent
b4f628c1
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!7452
Issue #1797438. HTML5 validation is preventing form submit and not fully...
,
!789
Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/node.module
+4
-5
4 additions, 5 deletions
modules/node.module
modules/node/node.module
+4
-5
4 additions, 5 deletions
modules/node/node.module
with
8 additions
and
10 deletions
modules/node.module
+
4
−
5
View file @
634893f2
...
@@ -227,7 +227,7 @@ function node_teaser($body) {
...
@@ -227,7 +227,7 @@ function node_teaser($body) {
*/
*/
function
node_get_module_name
(
$node
)
{
function
node_get_module_name
(
$node
)
{
if
(
is_array
(
$node
))
{
if
(
is_array
(
$node
))
{
if
(
$pos
=
strpos
(
$node
[
'type'
],
'
/
'
))
{
if
(
$pos
=
strpos
(
$node
[
'type'
],
'
-
'
))
{
return
substr
(
$node
[
'type'
],
0
,
$pos
);
return
substr
(
$node
[
'type'
],
0
,
$pos
);
}
}
else
{
else
{
...
@@ -235,7 +235,7 @@ function node_get_module_name($node) {
...
@@ -235,7 +235,7 @@ function node_get_module_name($node) {
}
}
}
}
else
if
(
is_object
(
$node
))
{
else
if
(
is_object
(
$node
))
{
if
(
$pos
=
strpos
(
$node
->
type
,
'
/
'
))
{
if
(
$pos
=
strpos
(
$node
->
type
,
'
-
'
))
{
return
substr
(
$node
->
type
,
0
,
$pos
);
return
substr
(
$node
->
type
,
0
,
$pos
);
}
}
else
{
else
{
...
@@ -243,7 +243,7 @@ function node_get_module_name($node) {
...
@@ -243,7 +243,7 @@ function node_get_module_name($node) {
}
}
}
}
else
if
(
is_string
(
$node
))
{
else
if
(
is_string
(
$node
))
{
if
(
$pos
=
strpos
(
$node
,
'
/
'
))
{
if
(
$pos
=
strpos
(
$node
,
'
-
'
))
{
return
substr
(
$node
,
0
,
$pos
);
return
substr
(
$node
,
0
,
$pos
);
}
}
else
{
else
{
...
@@ -1521,8 +1521,7 @@ function node_page() {
...
@@ -1521,8 +1521,7 @@ function node_page() {
node_feed
();
node_feed
();
return
;
return
;
case
'add'
:
case
'add'
:
// When a module defines multiple node types, the URL is of the form 'foo/bar':
print
theme
(
'page'
,
node_add
(
arg
(
2
)));
print
theme
(
'page'
,
node_add
(
arg
(
3
)
?
arg
(
2
)
.
"/"
.
arg
(
3
)
:
arg
(
2
)));
break
;
break
;
case
'edit'
:
case
'edit'
:
print
theme
(
'page'
,
node_edit
(
arg
(
2
)));
print
theme
(
'page'
,
node_edit
(
arg
(
2
)));
...
...
This diff is collapsed.
Click to expand it.
modules/node/node.module
+
4
−
5
View file @
634893f2
...
@@ -227,7 +227,7 @@ function node_teaser($body) {
...
@@ -227,7 +227,7 @@ function node_teaser($body) {
*/
*/
function
node_get_module_name
(
$node
)
{
function
node_get_module_name
(
$node
)
{
if
(
is_array
(
$node
))
{
if
(
is_array
(
$node
))
{
if
(
$pos
=
strpos
(
$node
[
'type'
],
'
/
'
))
{
if
(
$pos
=
strpos
(
$node
[
'type'
],
'
-
'
))
{
return
substr
(
$node
[
'type'
],
0
,
$pos
);
return
substr
(
$node
[
'type'
],
0
,
$pos
);
}
}
else
{
else
{
...
@@ -235,7 +235,7 @@ function node_get_module_name($node) {
...
@@ -235,7 +235,7 @@ function node_get_module_name($node) {
}
}
}
}
else
if
(
is_object
(
$node
))
{
else
if
(
is_object
(
$node
))
{
if
(
$pos
=
strpos
(
$node
->
type
,
'
/
'
))
{
if
(
$pos
=
strpos
(
$node
->
type
,
'
-
'
))
{
return
substr
(
$node
->
type
,
0
,
$pos
);
return
substr
(
$node
->
type
,
0
,
$pos
);
}
}
else
{
else
{
...
@@ -243,7 +243,7 @@ function node_get_module_name($node) {
...
@@ -243,7 +243,7 @@ function node_get_module_name($node) {
}
}
}
}
else
if
(
is_string
(
$node
))
{
else
if
(
is_string
(
$node
))
{
if
(
$pos
=
strpos
(
$node
,
'
/
'
))
{
if
(
$pos
=
strpos
(
$node
,
'
-
'
))
{
return
substr
(
$node
,
0
,
$pos
);
return
substr
(
$node
,
0
,
$pos
);
}
}
else
{
else
{
...
@@ -1521,8 +1521,7 @@ function node_page() {
...
@@ -1521,8 +1521,7 @@ function node_page() {
node_feed
();
node_feed
();
return
;
return
;
case
'add'
:
case
'add'
:
// When a module defines multiple node types, the URL is of the form 'foo/bar':
print
theme
(
'page'
,
node_add
(
arg
(
2
)));
print
theme
(
'page'
,
node_add
(
arg
(
3
)
?
arg
(
2
)
.
"/"
.
arg
(
3
)
:
arg
(
2
)));
break
;
break
;
case
'edit'
:
case
'edit'
:
print
theme
(
'page'
,
node_edit
(
arg
(
2
)));
print
theme
(
'page'
,
node_edit
(
arg
(
2
)));
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment