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
e5e26a07
Commit
e5e26a07
authored
Apr 23, 2004
by
Dries
Browse files
- Patch
#7302
by Gerhard: saves the selected terms in a session variable.
parent
cf98e0a1
Changes
2
Hide whitespace changes
Inline
Side-by-side
modules/taxonomy.module
View file @
e5e26a07
...
...
@@ -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
);
}
...
...
modules/taxonomy/taxonomy.module
View file @
e5e26a07
...
...
@@ -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
);
}
...
...
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