- Patch #693362 by catch: taxonomy_form_all() is dead code, and dangerous.
parent
f97a92d5fc
commit
76a3a1f41f
|
@ -572,24 +572,6 @@ function taxonomy_terms_static_reset() {
|
||||||
entity_get_controller('taxonomy_term')->resetCache();
|
entity_get_controller('taxonomy_term')->resetCache();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Generate a set of options for selecting a term from all vocabularies.
|
|
||||||
*/
|
|
||||||
function taxonomy_form_all() {
|
|
||||||
$vocabularies = taxonomy_get_vocabularies();
|
|
||||||
$options = array();
|
|
||||||
foreach ($vocabularies as $vid => $vocabulary) {
|
|
||||||
$tree = taxonomy_get_tree($vid);
|
|
||||||
if ($tree && (count($tree) > 0)) {
|
|
||||||
$options[$vocabulary->name] = array();
|
|
||||||
foreach ($tree as $term) {
|
|
||||||
$options[$vocabulary->name][$term->tid] = str_repeat('-', $term->depth) . $term->name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return $options;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return an array of all vocabulary objects.
|
* Return an array of all vocabulary objects.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue