diff options
Diffstat (limited to 'modules/taxonomy/taxonomy.module')
-rw-r--r-- | modules/taxonomy/taxonomy.module | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index 5e2f343a5..e6d1b9a79 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -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); } |