Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
224
Merge Requests
224
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
54671976
Commit
54671976
authored
Jun 07, 2007
by
Dries
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Patch
#101319
by pwolanin: make sure that node->revision can be altered.
parent
36cdf061
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
12 deletions
+13
-12
modules/node/node.module
modules/node/node.module
+13
-12
No files found.
modules/node/node.module
View file @
54671976
...
...
@@ -2022,6 +2022,19 @@ function node_object_prepare(&$node) {
$node
->
date
=
format_date
(
$node
->
created
,
'custom'
,
'Y-m-d H:i:s O'
);
}
}
$node_options
=
variable_get
(
'node_options_'
.
$node
->
type
,
array
(
'status'
,
'promote'
));
// If this is a new node, fill in the default values.
if
(
!
isset
(
$node
->
nid
))
{
foreach
(
array
(
'status'
,
'promote'
,
'sticky'
)
as
$key
)
{
$node
->
$key
=
in_array
(
$key
,
$node_options
);
}
global
$user
;
$node
->
uid
=
$user
->
uid
;
}
// Always use the default revision setting.
$node
->
revision
=
in_array
(
'revision'
,
$node_options
);
node_invoke
(
$node
,
'prepare'
);
node_invoke_nodeapi
(
$node
,
'prepare'
);
}
...
...
@@ -2067,18 +2080,6 @@ function node_form(&$form_state, $node) {
$form
[
'title'
][
'#weight'
]
=
-
5
;
}
$node_options
=
variable_get
(
'node_options_'
.
$node
->
type
,
array
(
'status'
,
'promote'
));
// If this is a new node, fill in the default values.
if
(
!
isset
(
$node
->
nid
))
{
foreach
(
array
(
'status'
,
'promote'
,
'sticky'
)
as
$key
)
{
$node
->
$key
=
in_array
(
$key
,
$node_options
);
}
global
$user
;
$node
->
uid
=
$user
->
uid
;
}
// Always use the default revision setting.
$node
->
revision
=
in_array
(
'revision'
,
$node_options
);
$form
[
'#node'
]
=
$node
;
// Add a log field if the "Create new revision" option is checked, or if the
...
...
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