summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrandon Bergren2008-06-13 16:55:13 (GMT)
committer Brandon Bergren2008-06-13 16:55:13 (GMT)
commitaaa142114bfab0e6821d08de287b0425ad4b021a (patch)
tree122cae23f7af59b57fdafc21b37adee379012af1
parent0dedcb950259f34b7356ca8ffc89b6ad10395d9a (diff)
Assign a proper map id if a macro didn't specify one.
-rw-r--r--gmap.module5
1 files changed, 5 insertions, 0 deletions
diff --git a/gmap.module b/gmap.module
index 0b6bdc9..bd0cfa7 100644
--- a/gmap.module
+++ b/gmap.module
@@ -523,6 +523,11 @@ function gmap_parse_macro($instring, $ver = 2) {
}
unset($m['markers-temp']);
+ // Assign an id if one wasn't specified.
+ if (!$m['id']) {
+ $m['id'] = gmap_get_auto_mapid();
+ }
+
// The macro can now be manipulated by reference.
foreach (module_implements('gmap') as $module) {
$additions = call_user_func_array($module .'_gmap', array('parse_macro', &$m));