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
a50eb34b
Commit
a50eb34b
authored
Jan 17, 2006
by
Dries
Browse files
- Patch
#44381
by gerhard: improved consistency of API. Always pass an array.
parent
8b5175a9
Changes
2
Hide whitespace changes
Inline
Side-by-side
modules/taxonomy.module
View file @
a50eb34b
...
...
@@ -169,7 +169,7 @@ function taxonomy_save_vocabulary(&$edit) {
}
function
taxonomy_del_vocabulary
(
$vid
)
{
$vocabulary
=
taxonomy_get_vocabulary
(
$vid
);
$vocabulary
=
(
array
)
taxonomy_get_vocabulary
(
$vid
);
db_query
(
'DELETE FROM {vocabulary} WHERE vid = %d'
,
$vid
);
db_query
(
'DELETE FROM {vocabulary_node_types} WHERE vid = %d'
,
$vid
);
...
...
@@ -331,7 +331,7 @@ function taxonomy_del_term($tid) {
}
}
$term
=
taxonomy_get_term
(
$tid
);
$term
=
(
array
)
taxonomy_get_term
(
$tid
);
db_query
(
'DELETE FROM {term_data} WHERE tid = %d'
,
$tid
);
db_query
(
'DELETE FROM {term_hierarchy} WHERE tid = %d'
,
$tid
);
...
...
@@ -340,7 +340,7 @@ function taxonomy_del_term($tid) {
db_query
(
'DELETE FROM {term_node} WHERE tid = %d'
,
$tid
);
module_invoke_all
(
'taxonomy'
,
'delete'
,
'term'
,
$term
);
drupal_set_message
(
t
(
'Deleted term %name.'
,
array
(
'%name'
=>
theme
(
'placeholder'
,
$term
->
name
))));
drupal_set_message
(
t
(
'Deleted term %name.'
,
array
(
'%name'
=>
theme
(
'placeholder'
,
$term
[
'
name
'
]
))));
}
$tids
=
$orphans
;
...
...
modules/taxonomy/taxonomy.module
View file @
a50eb34b
...
...
@@ -169,7 +169,7 @@ function taxonomy_save_vocabulary(&$edit) {
}
function
taxonomy_del_vocabulary
(
$vid
)
{
$vocabulary
=
taxonomy_get_vocabulary
(
$vid
);
$vocabulary
=
(
array
)
taxonomy_get_vocabulary
(
$vid
);
db_query
(
'DELETE FROM {vocabulary} WHERE vid = %d'
,
$vid
);
db_query
(
'DELETE FROM {vocabulary_node_types} WHERE vid = %d'
,
$vid
);
...
...
@@ -331,7 +331,7 @@ function taxonomy_del_term($tid) {
}
}
$term
=
taxonomy_get_term
(
$tid
);
$term
=
(
array
)
taxonomy_get_term
(
$tid
);
db_query
(
'DELETE FROM {term_data} WHERE tid = %d'
,
$tid
);
db_query
(
'DELETE FROM {term_hierarchy} WHERE tid = %d'
,
$tid
);
...
...
@@ -340,7 +340,7 @@ function taxonomy_del_term($tid) {
db_query
(
'DELETE FROM {term_node} WHERE tid = %d'
,
$tid
);
module_invoke_all
(
'taxonomy'
,
'delete'
,
'term'
,
$term
);
drupal_set_message
(
t
(
'Deleted term %name.'
,
array
(
'%name'
=>
theme
(
'placeholder'
,
$term
->
name
))));
drupal_set_message
(
t
(
'Deleted term %name.'
,
array
(
'%name'
=>
theme
(
'placeholder'
,
$term
[
'
name
'
]
))));
}
$tids
=
$orphans
;
...
...
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