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
8118bd0e
Commit
8118bd0e
authored
Aug 31, 2006
by
Dries
Browse files
- Patch
#81574
by assimmonds: deleting content types was broken.
parent
e907351c
Changes
2
Hide whitespace changes
Inline
Side-by-side
modules/node/content_types.inc
View file @
8118bd0e
...
...
@@ -361,7 +361,7 @@ function node_type_reset(&$type) {
/**
* Menu callback; delete a single content type.
*/
function
node_type_delete
(
$type
)
{
function
node_type_delete
_confirm
(
$type
)
{
$form
[
'type'
]
=
array
(
'#type'
=>
'value'
,
'#value'
=>
$type
->
type
);
$form
[
'name'
]
=
array
(
'#type'
=>
'value'
,
'#value'
=>
$type
->
name
);
...
...
@@ -375,13 +375,13 @@ function node_type_delete($type) {
$caption
.
=
'<p>'
.
t
(
'This action cannot be undone.'
)
.
'</p>'
;
return
confirm_form
(
'node_type_delete_form'
,
$form
,
$message
,
'admin/content/types'
,
$caption
,
t
(
'Delete'
));
return
confirm_form
(
$form
,
$message
,
'admin/content/types'
,
$caption
,
t
(
'Delete'
));
}
/**
* Process content type delete
fo
rm submissions.
* Process content type delete
confi
rm submissions.
*/
function
node_type_delete_
fo
rm_submit
(
$form_id
,
$form_values
)
{
function
node_type_delete_
confi
rm_submit
(
$form_id
,
$form_values
)
{
db_query
(
"DELETE FROM
{
node_type
}
WHERE type = '%s'"
,
$form_values
[
'type'
]);
$t_args
=
array
(
'%name'
=>
$form_values
[
'name'
]);
...
...
modules/node/node.module
View file @
8118bd0e
...
...
@@ -1130,7 +1130,7 @@ function node_menu($may_cache) {
'path'
=>
'admin/content/types/'
.
$type_url_str
.
'/delete'
,
'title'
=>
t
(
'delete'
),
'callback'
=>
'drupal_get_form'
,
'callback arguments'
=>
array
(
'node_type_delete'
,
$type
),
'callback arguments'
=>
array
(
'node_type_delete
_confirm
'
,
$type
),
'type'
=>
MENU_CALLBACK
,
);
}
...
...
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