From 84241c7ec5e27bd5f4f6eb1b85ad3c49829e784c Mon Sep 17 00:00:00 2001
From: Brandon Bergren <bdragon@rtk0.net>
Date: Sun, 24 Jan 2010 02:09:49 +0000
Subject: [PATCH] Backporting whitespace changes for diff minimization reasons.

---
 gmap.module | 78 ++++++++++++++++++++++++++---------------------------
 1 file changed, 39 insertions(+), 39 deletions(-)

diff --git a/gmap.module b/gmap.module
index 8b21eb0..afc4bd7 100644
--- a/gmap.module
+++ b/gmap.module
@@ -90,7 +90,7 @@ function gmap_gmap($op, &$map) {
         ),
       );
     case 'pre_theme_map':
-      $path = drupal_get_path('module', 'gmap') .'/js/';
+      $path = drupal_get_path('module', 'gmap') . '/js/';
       // Activate markers if needed.
       if ((isset($map['behavior']['dynmarkers']) && $map['behavior']['dynmarkers']) || !empty($map['markers'])) {
         static $header_set = FALSE;
@@ -117,8 +117,8 @@ function gmap_gmap($op, &$map) {
           }
         }
 
-        drupal_add_js($path .'icon.js');
-        drupal_add_js($path .'marker.js');
+        drupal_add_js($path . 'icon.js');
+        drupal_add_js($path . 'marker.js');
 
         $mm = variable_get('gmap_mm_type', 'gmap');
         // If you really really want to override the marker manager, implement
@@ -127,20 +127,20 @@ function gmap_gmap($op, &$map) {
           _gmap_markermanager_override($mm);
         }
 
-        drupal_add_js($path . $mm .'_marker.js');
+        drupal_add_js($path . $mm . '_marker.js');
       }
       if (isset($map['behavior']['locpick']) && $map['behavior']['locpick']) {
-        drupal_add_js($path .'locpick.js');
+        drupal_add_js($path . 'locpick.js');
       }
       if (!empty($map['markers']) || !empty($map['lines'])) {
-        drupal_add_js($path .'markerloader_static.js');
+        drupal_add_js($path . 'markerloader_static.js');
       }
       if (!empty($map['shapes'])) {
-        drupal_add_js($path .'shapeloader_static.js');
-        drupal_add_js($path .'gmap_shapes.js');
+        drupal_add_js($path . 'shapeloader_static.js');
+        drupal_add_js($path . 'gmap_shapes.js');
       }
       if (isset($map['feed']) && is_array($map['feed'])) {
-        drupal_add_js($path .'markerloader_georss.js');
+        drupal_add_js($path . 'markerloader_georss.js');
       }
       break;
     case 'macro_multiple':
@@ -259,8 +259,8 @@ function _gmap_doheader() {
     return;
   }
   $gmap_path = drupal_get_path('module', 'gmap');
-  drupal_add_css($gmap_path .'/gmap.css');
-  drupal_add_js($gmap_path .'/js/gmap.js');
+  drupal_add_css($gmap_path . '/gmap.css');
+  drupal_add_js($gmap_path . '/js/gmap.js');
   $mm = variable_get('gmap_mm_type', 'gmap');
   $mms = variable_get('gmap_markermanager', array());
   if (empty($mms[$mm])) {
@@ -273,16 +273,16 @@ function _gmap_doheader() {
   }
   if ($mm == 'clusterer' || $mm == 'clustermarker') {
     // Needed for access to clusterer marker.
-    drupal_add_js($gmap_path .'/js/icon.js');
+    drupal_add_js($gmap_path . '/js/icon.js');
   }
   if (isset($mms[$mm]['filename'])) {
-    drupal_add_js($gmap_path .'/thirdparty/'. $mms[$mm]['filename']);
+    drupal_add_js($gmap_path . '/thirdparty/' . $mms[$mm]['filename']);
   }
-  drupal_add_js($gmap_path .'/js/marker.js');
-  drupal_add_js($gmap_path .'/js/'. $mm .'_marker.js');
+  drupal_add_js($gmap_path . '/js/marker.js');
+  drupal_add_js($gmap_path . '/js/' . $mm . '_marker.js');
   drupal_add_js(array('gmap_markermanager' => $mms[$mm]), 'setting');
 // @@@
-drupal_add_js($gmap_path .'/js/poly.js');
+drupal_add_js($gmap_path . '/js/poly.js');
 
   global $language;
   $query = array(
@@ -308,7 +308,7 @@ drupal_add_js($gmap_path .'/js/poly.js');
  *   A GMap array.
  */
 function gmap_parse_macro($instring, $ver = 2) {
-  require_once drupal_get_path('module', 'gmap') .'/gmap_parse_macro.inc';
+  require_once drupal_get_path('module', 'gmap') . '/gmap_parse_macro.inc';
   return _gmap_parse_macro($instring, $ver);
 }
 
@@ -346,7 +346,7 @@ function gmap_set_location($map, &$form, $fields) {
   if (!is_array($map)) {
     $map = array_merge(gmap_defaults(), gmap_parse_macro($map));
   }
-  $id = 'loc'. $ctr;
+  $id = 'loc' . $ctr;
   $map['id'] = $id;
 
   // This is a locpick map.
@@ -463,7 +463,7 @@ function gmap_filter($op, $delta = 0, $format = -1, $text = '') {
  */
 function gmap_filter_tips($delta, $format, $long = FALSE) {
   if (user_access('create gmap macro')) { // only display macro if user can create one
-    return t('Insert Google Map macro.') .'<a href="'. url('map/macro') .'" target="_blank" >'. t('Create a macro') .'</a>';
+    return t('Insert Google Map macro.') . '<a href="' . url('map/macro') . '" target="_blank" >' . t('Create a macro') . '</a>';
   }
   else {
     return t('Insert Google Map macro.');
@@ -497,8 +497,8 @@ function gmap_regenerate_markers() {
   file_check_directory($jspath, FILE_CREATE_DIRECTORY);
 
   $contents .= "// GMap marker image data.\n";
-  $contents .= "Drupal.gmap.iconpath = ". drupal_to_js(base_path() . variable_get('gmap_markerfiles', drupal_get_path('module', 'gmap') .'/markers')) .";\n";
-  $contents .= "Drupal.gmap.icondata = ". drupal_to_js(gmap_get_icondata(TRUE)) .";\n";
+  $contents .= "Drupal.gmap.iconpath = " . drupal_to_js(base_path() . variable_get('gmap_markerfiles', drupal_get_path('module', 'gmap') . '/markers')) . ";\n";
+  $contents .= "Drupal.gmap.icondata = " . drupal_to_js(gmap_get_icondata(TRUE)) . ";\n";
 
   file_save_data($contents, "$jspath/gmap_markers.js", FILE_EXISTS_REPLACE);
 
@@ -775,9 +775,9 @@ function process_gmap_markerchooser($element) {
  */
 function theme_gmap_overlay_edit($element) {
   $path = drupal_get_path('module', 'gmap');
-  drupal_add_js($path .'/js/gmap.js');
-  drupal_add_js($path .'/js/gmap_shapes.js');
-  drupal_add_js($path .'/js/overlay_edit.js');
+  drupal_add_js($path . '/js/gmap.js');
+  drupal_add_js($path . '/js/gmap_shapes.js');
+  drupal_add_js($path . '/js/overlay_edit.js');
   return theme('select', $element);
 }
 
@@ -806,20 +806,20 @@ function gmap_map_cleanup(&$map) {
 }
 
 function theme_gmap_macrotext($element) {
-  drupal_add_js(drupal_get_path('module', 'gmap') .'/js/macro.js');
+  drupal_add_js(drupal_get_path('module', 'gmap') . '/js/macro.js');
   // @@@
-  drupal_add_js(drupal_get_path('module', 'gmap') .'/js/macrobuilder.js');
+  drupal_add_js(drupal_get_path('module', 'gmap') . '/js/macrobuilder.js');
   return theme('textarea', $element);
 }
 
 function theme_gmap_address($element) {
-  drupal_add_js(drupal_get_path('module', 'gmap') .'/js/address.js');
+  drupal_add_js(drupal_get_path('module', 'gmap') . '/js/address.js');
   $element['#autocomplete_path'] = '';
   return theme('textfield', $element);
 }
 
 function theme_gmap_align($element) {
-  drupal_add_js(drupal_get_path('module', 'gmap') .'/js/align.js');
+  drupal_add_js(drupal_get_path('module', 'gmap') . '/js/align.js');
   $element['#multiple'] = FALSE;
   return theme('select', $element);
 }
@@ -902,19 +902,19 @@ function theme_gmap($element) {
   }
 
   $style = array();
-  $style[] = 'width: '. $map['width'];
-  $style[] = 'height: '. $map['height'];
+  $style[] = 'width: ' . $map['width'];
+  $style[] = 'height: ' . $map['height'];
 
-  $element['#attributes']['class'] = trim($element['#attributes']['class'] .' gmap gmap-map gmap-'. $mapid .'-gmap');
+  $element['#attributes']['class'] = trim($element['#attributes']['class'] . ' gmap gmap-map gmap-' . $mapid . '-gmap');
 
   // Some markup parsers (IE) don't handle empty inners well. Use the space to let users know javascript is required.
   // @@@ Bevan sez: Google static maps could be useful here.
   // @@@ Bdragon sez: Yeah, would be nice, but hard to guarantee functionality. Not everyone uses the static markerloader.
-  $o = '<div style="'. implode('; ', $style) .';" id="'. $element['#id'] .'"'. drupal_attributes($element['#attributes']) .'>'. t('Javascript is required to view this map.') .'</div>';
+  $o = '<div style="' . implode('; ', $style) . ';" id="' . $element['#id'] . '"' . drupal_attributes($element['#attributes']) . '>' . t('Javascript is required to view this map.') . '</div>';
 
   // $map can be manipulated by reference.
   foreach (module_implements('gmap') as $module) {
-    call_user_func_array($module .'_gmap', array('pre_theme_map', &$map));
+    call_user_func_array($module . '_gmap', array('pre_theme_map', &$map));
   }
 
   if (isset($mapids[$element['#map']])) {
@@ -962,7 +962,7 @@ function gmap_widget_setup(&$element, $type, $map=NULL) {
   $element['#attributes']['class'] = trim(implode(' ', array(
     $element['#attributes']['class'],
     'gmap-control',
-    'gmap-'. $type,
+    'gmap-' . $type,
   )));
   $element['#id'] = gmap_get_id($map, $type);
   $element['#map'] = $map;
@@ -982,7 +982,7 @@ function gmap_get_id($map, $type) {
     $serial[$map][$type] = -1;
   }
   $serial[$map][$type]++;
-  return 'gmap-'. $map .'-'. $type . $serial[$map][$type];
+  return 'gmap-' . $map . '-' . $type . $serial[$map][$type];
 }
 
 /**
@@ -991,7 +991,7 @@ function gmap_get_id($map, $type) {
 function gmap_get_auto_mapid() {
   static $auto = 0;
   $auto++;
-  return 'auto'. $auto .'map';
+  return 'auto' . $auto . 'map';
 }
 
 /**
@@ -1014,7 +1014,7 @@ function gmap_get_marker_titles($reset = FALSE) {
     }
   }
 
-  require_once(drupal_get_path('module', 'gmap') .'/gmap_markerinfo.inc');
+  require_once(drupal_get_path('module', 'gmap') . '/gmap_markerinfo.inc');
   $titles = _gmap_get_marker_titles();
   cache_set('gmap_marker_titles', $titles, 'cache');
   return $titles;
@@ -1035,7 +1035,7 @@ function gmap_get_icondata($reset = FALSE) {
   }
 
   if ($reset || !$icons) {
-    require_once(drupal_get_path('module', 'gmap') .'/gmap_markerinfo.inc');
+    require_once(drupal_get_path('module', 'gmap') . '/gmap_markerinfo.inc');
     $icons = _gmap_get_icondata();
   }
   cache_set('gmap_icondata', $icons, 'cache');
@@ -1077,7 +1077,7 @@ function gmap_decimal($num) {
  */
 function gmap_geocode($address, $tld = 'com') {
   $key = gmap_get_key();
-  $data = drupal_http_request('http://maps.google.'. $tld .'/maps/geo?q='. drupal_urlencode($address) .'&output=csv&key='. $key);
+  $data = drupal_http_request('http://maps.google.' . $tld . '/maps/geo?q=' . drupal_urlencode($address) . '&output=csv&key=' . $key);
   if ($data->code == 200) {
     $r = explode(',', $data->data);
     return array(
-- 
GitLab