Commit e5e26a07 authored by Dries's avatar Dries
Browse files

- Patch #7302 by Gerhard: saves the selected terms in a session variable.

parent cf98e0a1
......@@ -603,6 +603,14 @@ function taxonomy_get_term($tid) {
function _taxonomy_term_select($title, $name, $value, $vocabulary_id, $description, $multiple, $blank, $exclude = array()) {
$tree = taxonomy_get_tree($vocabulary_id);
// We store the last selected ID in a session variable:
if (!$value) {
$value = $_SESSION['vocabulary']["$vocabulary_id"];
}
else {
$_SESSION['vocabulary']["$vocabulary_id"] = $value;
}
if ($blank) {
$options[] = array("tid" => 0, "name" => $blank);
}
......
......@@ -603,6 +603,14 @@ function taxonomy_get_term($tid) {
function _taxonomy_term_select($title, $name, $value, $vocabulary_id, $description, $multiple, $blank, $exclude = array()) {
$tree = taxonomy_get_tree($vocabulary_id);
// We store the last selected ID in a session variable:
if (!$value) {
$value = $_SESSION['vocabulary']["$vocabulary_id"];
}
else {
$_SESSION['vocabulary']["$vocabulary_id"] = $value;
}
if ($blank) {
$options[] = array("tid" => 0, "name" => $blank);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment