Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
gmap
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
drupal.org
gmap
Commits
b6ce1548
Commit
b6ce1548
authored
12 years ago
by
DuaelFr
Committed by
Andriy Podanenko
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Issue #1903632 by DuaelFr: Added Gmap Taxonomy: Split configuration.
parent
af0595a0
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
gmap_taxonomy.install
+13
-0
13 additions, 0 deletions
gmap_taxonomy.install
gmap_taxonomy.module
+5
-10
5 additions, 10 deletions
gmap_taxonomy.module
with
18 additions
and
10 deletions
gmap_taxonomy.install
+
13
−
0
View file @
b6ce1548
...
@@ -106,6 +106,19 @@ function gmap_taxonomy_update_7201() {
...
@@ -106,6 +106,19 @@ function gmap_taxonomy_update_7201() {
variable_set
(
'gmap_taxonomy_vocabs'
,
$result
);
variable_set
(
'gmap_taxonomy_vocabs'
,
$result
);
}
}
/**
* Split settings in a variable for each vocabulary.
*/
function
gmap_taxonomy_update_7202
()
{
$enabled_vocabularies
=
variable_get
(
'gmap_taxonomy_vocabs'
,
array
());
foreach
(
$enabled_vocabularies
as
$machine_name
=>
$enabled
)
{
variable_set
(
'gmap_taxonomy_vocab_'
.
$machine_name
,
$enabled
);
}
variable_del
(
'gmap_taxonomy_vocabs'
);
}
/**
/**
* Rebuild {gmap_taxonomy_node} again.
* Rebuild {gmap_taxonomy_node} again.
*/
*/
...
...
This diff is collapsed.
Click to expand it.
gmap_taxonomy.module
+
5
−
10
View file @
b6ce1548
...
@@ -77,9 +77,9 @@ function gmap_taxonomy_taxonomy_vocabulary_insert($vocabulary) {
...
@@ -77,9 +77,9 @@ function gmap_taxonomy_taxonomy_vocabulary_insert($vocabulary) {
*/
*/
function
gmap_taxonomy_taxonomy_vocabulary_update
(
$vocabulary
)
{
function
gmap_taxonomy_taxonomy_vocabulary_update
(
$vocabulary
)
{
if
(
isset
(
$vocabulary
->
gmap_taxonomy_enable
))
{
if
(
isset
(
$vocabulary
->
gmap_taxonomy_enable
))
{
$status
=
variable_
g
et
(
'gmap_taxonomy_vocab
s'
,
array
()
);
variable_
s
et
(
'gmap_taxonomy_vocab
_'
.
$vocabulary
->
machine_name
,
TRUE
);
$status
[
$vocabulary
->
machine_name
]
=
$vocabulary
->
gmap_taxonomy_enable
;
}
else
{
variable_
set
(
'gmap_taxonomy_vocab
s'
,
$status
);
variable_
del
(
'gmap_taxonomy_vocab
_'
.
$vocabulary
->
machine_name
);
}
}
}
}
...
@@ -87,9 +87,7 @@ function gmap_taxonomy_taxonomy_vocabulary_update($vocabulary) {
...
@@ -87,9 +87,7 @@ function gmap_taxonomy_taxonomy_vocabulary_update($vocabulary) {
* Implement hook_taxonomy_vocabulary_delete().
* Implement hook_taxonomy_vocabulary_delete().
*/
*/
function
gmap_taxonomy_taxonomy_vocabulary_delete
(
$vocabulary
)
{
function
gmap_taxonomy_taxonomy_vocabulary_delete
(
$vocabulary
)
{
$status
=
variable_get
(
'gmap_taxonomy_vocabs'
,
array
());
variable_del
(
'gmap_taxonomy_vocab_'
.
$vocabulary
->
machine_name
);
unset
(
$status
[
$vocabulary
->
machine_name
]);
variable_set
(
'gmap_taxonomy_vocabs'
,
$status
);
}
}
/**
/**
...
@@ -220,11 +218,8 @@ function gmap_taxonomy_vocabulary_is_enabled($vocabulary) {
...
@@ -220,11 +218,8 @@ function gmap_taxonomy_vocabulary_is_enabled($vocabulary) {
$vocabulary
=
taxonomy_vocabulary_load
(
$vocabulary
);
$vocabulary
=
taxonomy_vocabulary_load
(
$vocabulary
);
}
}
$enabled_vocabularies
=
variable_get
(
'gmap_taxonomy_vocabs'
,
array
());
return
$vocabulary
return
$vocabulary
&&
isset
(
$enabled_vocabularies
[
$vocabulary
->
machine_name
])
&&
variable_get
(
'gmap_taxonomy_vocab_'
.
$vocabulary
->
machine_name
,
FALSE
);
&&
$enabled_vocabularies
[
$vocabulary
->
machine_name
];
}
}
/**
/**
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment