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
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Commits
b6164a4c
Commit
b6164a4c
authored
15 years ago
by
Dries Buytaert
Browse files
Options
Downloads
Patches
Plain Diff
- Patch
#586436
by Amitaibu: execute node_type_save() after variable_set().
parent
04d0ef5c
No related branches found
Branches containing commit
No related tags found
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
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/node/content_types.inc
+6
-4
6 additions, 4 deletions
modules/node/content_types.inc
with
6 additions
and
4 deletions
modules/node/content_types.inc
+
6
−
4
View file @
b6164a4c
...
...
@@ -37,7 +37,7 @@ function node_overview_types() {
if
(
empty
(
$rows
))
{
$rows
[]
=
array
(
array
(
'data'
=>
t
(
'No content types available. <a href="@link">Add content type</a>.'
,
array
(
'@link'
=>
url
(
'admin/structure/types/add'
))),
'colspan'
=>
'5'
,
'class'
=>
array
(
'message'
)));
}
$build
[
'node_table'
]
=
array
(
'#theme'
=>
'table'
,
'#header'
=>
$header
,
...
...
@@ -199,7 +199,7 @@ function node_type_form($form, &$form_state, $type = NULL) {
'#description'
=>
t
(
'Enable the <em>submitted by Username on date</em> text.'
),
);
$form
[
'display'
][
'teaser_length'
]
=
array
(
'#type'
=>
'select'
,
'#type'
=>
'select'
,
'#title'
=>
t
(
'Length of trimmed posts'
),
'#default_value'
=>
variable_get
(
'teaser_length_'
.
$type
->
type
,
600
),
'#options'
=>
drupal_map_assoc
(
array
(
0
,
200
,
400
,
600
,
800
,
1000
,
1200
,
1400
,
1600
,
1800
,
2000
),
'_node_characters'
),
...
...
@@ -323,8 +323,6 @@ function node_type_form_submit($form, &$form_state) {
return
;
}
$status
=
node_type_save
(
$type
);
$variables
=
$form_state
[
'values'
];
// Remove everything that's been saved already - whatever's left is assumed
...
...
@@ -352,6 +350,10 @@ function node_type_form_submit($form, &$form_state) {
}
}
// Saving the content type after saving the variables allows modules to act
// on those variables via hook_node_type_insert().
$status
=
node_type_save
(
$type
);
node_types_rebuild
();
menu_rebuild
();
$t_args
=
array
(
'%name'
=>
$type
->
name
);
...
...
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