- Patch #19615 by chx: fixed problem forum container getting lets when editing a forum.

4.7.x
Dries Buytaert 2005-04-08 11:07:57 +00:00
parent 0f41706acc
commit 38eef18e98
2 changed files with 18 additions and 10 deletions

View File

@ -193,6 +193,14 @@ function forum_form_forum($edit = array()) {
function _forum_parent_select($tid, $title, $name) {
$parents = taxonomy_get_parents($tid);
if ($parents) {
$parent = array_shift($parents);
$parent = $parent->tid;
}
else {
$parent = 0;
}
$children = taxonomy_get_tree(_forum_get_vid, $tid);
// A term can't be the child of itself, nor of its children.
@ -211,11 +219,7 @@ function _forum_parent_select($tid, $title, $name) {
}
}
if (!$parents) {
$parents = 0;
}
return form_select($title, $name, $parents, $options, NULL, 0, FALSE, TRUE);
return form_select($title, $name, $parent, $options, NULL, 0, FALSE, TRUE);
}
/**

View File

@ -193,6 +193,14 @@ function forum_form_forum($edit = array()) {
function _forum_parent_select($tid, $title, $name) {
$parents = taxonomy_get_parents($tid);
if ($parents) {
$parent = array_shift($parents);
$parent = $parent->tid;
}
else {
$parent = 0;
}
$children = taxonomy_get_tree(_forum_get_vid, $tid);
// A term can't be the child of itself, nor of its children.
@ -211,11 +219,7 @@ function _forum_parent_select($tid, $title, $name) {
}
}
if (!$parents) {
$parents = 0;
}
return form_select($title, $name, $parents, $options, NULL, 0, FALSE, TRUE);
return form_select($title, $name, $parent, $options, NULL, 0, FALSE, TRUE);
}
/**