? .svn
? help
? js
? markers
? tests
? thirdparty
? translations
Index: gmap_markerinfo.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/gmap/gmap_markerinfo.inc,v
retrieving revision 1.3
diff -u -p -r1.3 gmap_markerinfo.inc
--- gmap_markerinfo.inc	15 Jul 2008 20:09:17 -0000	1.3
+++ gmap_markerinfo.inc	24 Dec 2009 11:29:52 -0000
@@ -10,6 +10,16 @@
  */
 
 /**
+ * Implementation of hook_gmap_markerfiles_info().
+ *
+ * We just scan the directory set in the the 'gmap_markerfiles' variable.
+ */
+function gmap_gmap_markerfiles_info() {
+  $markerdir = variable_get('gmap_markerfiles', drupal_get_path('module', 'gmap') .'/markers');
+  return file_scan_directory($markerdir, '.*\.ini$');
+}
+
+/**
  * Get marker icon data for constructing json object.
  */
 function _gmap_get_icondata() {
@@ -23,13 +33,14 @@ function _gmap_get_icondata() {
     'transparent',
   );
 
-  $markerdir = variable_get('gmap_markerfiles', drupal_get_path('module', 'gmap') .'/markers');
-
   // The following routines are designed to be easy to comprehend, not fast.
   // This whole process gets cached.
 
-  // Get the ini files.
-  $inifiles = file_scan_directory($markerdir, '.*\.ini$');
+  // Get the ini files from an info hook.
+  $inifiles = module_invoke_all('gmap_markerfiles_info');
+  drupal_alter('gmap_markerfiles_info', $inifiles);
+
+
   // Parse the ini files and store by path
   $inis = array();
   foreach ($inifiles as $file) {
