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
9d8799f6
Commit
9d8799f6
authored
May 16, 2006
by
drumm
Browse files
Reverting
#53653
, that function actually is called via a module_invoke() in node.module.
parent
0652e5b5
Changes
2
Hide whitespace changes
Inline
Side-by-side
modules/taxonomy.module
View file @
9d8799f6
...
...
@@ -548,6 +548,26 @@ function taxonomy_form($vid, $value = 0, $help = NULL, $name = 'taxonomy') {
return
_taxonomy_term_select
(
check_plain
(
$vocabulary
->
name
),
$name
,
$value
,
$vid
,
$help
,
intval
(
$vocabulary
->
multiple
),
$blank
);
}
/**
* Generate a set of options for selecting a term from all vocabularies. Can be
* passed to form_select.
*/
function
taxonomy_form_all
(
$free_tags
=
0
)
{
$vocabularies
=
taxonomy_get_vocabularies
();
$options
=
array
();
foreach
(
$vocabularies
as
$vid
=>
$vocabulary
)
{
if
(
$vocabulary
->
tags
&&
!
$free_tags
)
{
continue
;
}
$tree
=
taxonomy_get_tree
(
$vid
);
$options
[
$vocabulary
->
name
]
=
array
();
if
(
$tree
)
{
foreach
(
$tree
as
$term
)
{
$options
[
$vocabulary
->
name
][
$term
->
tid
]
=
_taxonomy_depth
(
$term
->
depth
,
'-'
)
.
$term
->
name
;
}
}
}
return
$options
;
}
/**
* Return an array of all vocabulary objects.
*
...
...
modules/taxonomy/taxonomy.module
View file @
9d8799f6
...
...
@@ -548,6 +548,26 @@ function taxonomy_form($vid, $value = 0, $help = NULL, $name = 'taxonomy') {
return
_taxonomy_term_select
(
check_plain
(
$vocabulary
->
name
),
$name
,
$value
,
$vid
,
$help
,
intval
(
$vocabulary
->
multiple
),
$blank
);
}
/**
* Generate a set of options for selecting a term from all vocabularies. Can be
* passed to form_select.
*/
function
taxonomy_form_all
(
$free_tags
=
0
)
{
$vocabularies
=
taxonomy_get_vocabularies
();
$options
=
array
();
foreach
(
$vocabularies
as
$vid
=>
$vocabulary
)
{
if
(
$vocabulary
->
tags
&&
!
$free_tags
)
{
continue
;
}
$tree
=
taxonomy_get_tree
(
$vid
);
$options
[
$vocabulary
->
name
]
=
array
();
if
(
$tree
)
{
foreach
(
$tree
as
$term
)
{
$options
[
$vocabulary
->
name
][
$term
->
tid
]
=
_taxonomy_depth
(
$term
->
depth
,
'-'
)
.
$term
->
name
;
}
}
}
return
$options
;
}
/**
* Return an array of all vocabulary objects.
*
...
...
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