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
1ff4da96
Commit
1ff4da96
authored
Oct 15, 2002
by
Kjartan
Browse files
- submit page will now use $edit[teaser/body] if available in the initial request.
parent
1e971295
Changes
2
Hide whitespace changes
Inline
Side-by-side
modules/node.module
View file @
1ff4da96
...
...
@@ -915,7 +915,7 @@ function node_form($edit, $error = NULL) {
}
function
node_add
(
$type
)
{
global
$user
;
global
$user
,
$edit
;
if
(
!
user_access
(
"post content"
))
{
return
message_access
();
...
...
@@ -928,7 +928,7 @@ function node_add($type) {
if
(
$type
&&
node_access
(
"create"
,
$type
))
{
// Initialize settings
$output
=
node_form
(
array
(
"uid"
=>
$user
->
uid
,
"name"
=>
$user
->
name
,
"type"
=>
$type
,
"status"
=>
1
,
"promote"
=>
!
module_exist
(
"queue"
),
"moderate"
=>
module_exist
(
"queue"
),
"comment"
=>
module_exist
(
"queue"
)
?
2
:
0
));
$output
=
node_form
(
array
(
"uid"
=>
$user
->
uid
,
"name"
=>
$user
->
name
,
"type"
=>
$type
,
"status"
=>
1
,
"promote"
=>
!
module_exist
(
"queue"
),
"moderate"
=>
module_exist
(
"queue"
),
"comment"
=>
module_exist
(
"queue"
)
?
2
:
0
,
"title"
=>
check_input
(
$edit
[
"title"
]),
"body"
=>
check_input
(
$edit
[
"body"
])
));
}
else
{
...
...
modules/node/node.module
View file @
1ff4da96
...
...
@@ -915,7 +915,7 @@ function node_form($edit, $error = NULL) {
}
function
node_add
(
$type
)
{
global
$user
;
global
$user
,
$edit
;
if
(
!
user_access
(
"post content"
))
{
return
message_access
();
...
...
@@ -928,7 +928,7 @@ function node_add($type) {
if
(
$type
&&
node_access
(
"create"
,
$type
))
{
// Initialize settings
$output
=
node_form
(
array
(
"uid"
=>
$user
->
uid
,
"name"
=>
$user
->
name
,
"type"
=>
$type
,
"status"
=>
1
,
"promote"
=>
!
module_exist
(
"queue"
),
"moderate"
=>
module_exist
(
"queue"
),
"comment"
=>
module_exist
(
"queue"
)
?
2
:
0
));
$output
=
node_form
(
array
(
"uid"
=>
$user
->
uid
,
"name"
=>
$user
->
name
,
"type"
=>
$type
,
"status"
=>
1
,
"promote"
=>
!
module_exist
(
"queue"
),
"moderate"
=>
module_exist
(
"queue"
),
"comment"
=>
module_exist
(
"queue"
)
?
2
:
0
,
"title"
=>
check_input
(
$edit
[
"title"
]),
"body"
=>
check_input
(
$edit
[
"body"
])
));
}
else
{
...
...
Write
Preview
Supports
Markdown
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